3737
3838#include <setjmp.h> // 21.4
3939#include <signal.h> // 21.5
40- #include <stdio.h> //21.6
41- #include <wchar.h> //21.6
40+ #include <stdio.h>
41+ #include <wchar.h>
4242#include <time.h> // 21.10
4343#include <tgmath.h> // 21.11
4444#include <fenv.h>
@@ -70,7 +70,7 @@ static _Atomic int misra_1_4_var; // 1.4
7070static _Noreturn void misra_1_4_func (void ) // 1.4
7171{
7272 if (0 != _Generic(misra_1_4_var )) {} // 1.4 17.3
73- printf_s ("hello" ); // 1.4
73+ printf_s ("hello" ); // 1.4 21.6
7474}
7575
7676#define MISRA_2_2 (1*60)
@@ -134,7 +134,7 @@ static void misra_3_2(int enable)
134134 ++ y ; // This is hidden if trigraph replacement is active
135135 }
136136
137- (void )printf ("x=%i, y=%i\n" , x , y );
137+ (void )printf ("x=%i, y=%i\n" , x , y ); //21.6
138138}
139139
140140extern int misra_5_1_extern_var_hides_var_x ;
@@ -209,9 +209,9 @@ int c41_15 = 'a'; // 10.3 8.4
209209
210210static void misra_4_1 (void )
211211{
212- (void )printf ("\x41g" ); // 4.1
213- (void )printf ("\x41\x42" );
214- (void )printf ("\x41" "g" );
212+ (void )printf ("\x41g" ); // 4.1 21.6
213+ (void )printf ("\x41\x42" ); //21.6
214+ (void )printf ("\x41" "g" ); //21.6
215215}
216216
217217const char * s42_1 = "String containing trigraphs ??-??-??" ; // 4.2 8.4
@@ -220,8 +220,8 @@ const char *s42_3 = "No trigraph?(?'?)"; // 8.4
220220
221221static void misra_4_2 (void )
222222{
223- (void )printf ("??=Trigraph\n" ); // 4.2
224- (void )printf ("No?/Trigraph\n" );
223+ (void )printf ("??=Trigraph\n" ); // 4.2 21.6
224+ (void )printf ("No?/Trigraph\n" ); //21.6
225225}
226226
227227#define misra_5_4_macro_hides_macro__31x 1
@@ -965,7 +965,7 @@ void misra_12_3(int a, int b, int c) {
965965 int a41 = MISRA_12_3_FN3_2 (a34 , a35 ), a42 ; // 12.3
966966 int a43 , a44 = MISRA_12_3_FN3_2 (a34 , a35 ); // 12.3
967967
968- MISRA_12_3_FN3_2_MSG (fprintf (stderr , "test\n" )); // 12.3
968+ MISRA_12_3_FN3_2_MSG (fprintf (stderr , "test\n" )); // 12.3 21.6
969969
970970 f ((1 ,2 ),3 ); // TODO
971971
0 commit comments