Alessandro Bonazzi e075990ed3 Patch level : 12.0 no-patch
Files correlati     :
Commento            :

Aggiunto il preprocessore c++ mcpp per sostituire il compilatore nella compilazione delle maschere.
2020-11-28 16:24:08 +01:00

36 lines
652 B
C

/* n_3.c: Handling of comment. */
#include "defs.h"
#define str( a) # a
main( void)
{
int abcd = 4;
fputs( "started\n", stderr);
/* 3.1: A comment is converted to one space. */
assert( strcmp( str( abc/* comment */de), "abc de") == 0);
/* 3.2: // is not a comment of C. */
/* assert( strcmp( str( //), "//") == 0); */
/* 3.3: Comment is parsed prior to the parsing of preprocessing directive. */
#if 0
"nonsence"; /*
#else
still in
comment */
#else
#define MACRO_abcd /*
in comment
*/ abcd
#endif
assert( MACRO_abcd == 4);
fputs( "success\n", stderr);
return 0;
}