#include /* ----------------- Example code from MISRA C:2012 begin ----------------- */ void f ( int16_t n ) { uint16_t val[ n ]; /* Non-compliant */ } void g ( void ) { f ( 0 ); f ( -1 ); f ( 10 ); } void h ( uint16_t n, uint16_t a[ 10 ][ n ] ) /* Non-compliant */ { uint16_t ( *p )[ 20 ]; p = a; } /* ------------------ Example code from MISRA C:2012 end ------------------ */