Blame cpp-test/test-t/n_3.c
|
Packit |
b40e2e |
/* n_3.c: Handling of comment. */
|
|
Packit |
b40e2e |
|
|
Packit |
b40e2e |
/* 3.1: A comment is converted to one space. */
|
|
Packit |
b40e2e |
/* abc de */
|
|
Packit |
b40e2e |
abc/* comment */de
|
|
Packit |
b40e2e |
|
|
Packit |
b40e2e |
/* 3.2: // is not a comment of C. */
|
|
Packit |
b40e2e |
#if 0 /* This feature is obsolete now. */
|
|
Packit |
b40e2e |
/* // is not a comment of C */
|
|
Packit |
b40e2e |
// is not a comment of C
|
|
Packit |
b40e2e |
#endif
|
|
Packit |
b40e2e |
|
|
Packit |
b40e2e |
/* 3.3: Comment is parsed prior to the parsing of preprocessing directive. */
|
|
Packit |
b40e2e |
/* abcd */
|
|
Packit |
b40e2e |
#if 0
|
|
Packit |
b40e2e |
"nonsence"; /*
|
|
Packit |
b40e2e |
#else
|
|
Packit |
b40e2e |
still in
|
|
Packit |
b40e2e |
comment */
|
|
Packit |
b40e2e |
#else
|
|
Packit |
b40e2e |
#define MACRO_abcd /*
|
|
Packit |
b40e2e |
in comment
|
|
Packit |
b40e2e |
*/ abcd
|
|
Packit |
b40e2e |
#endif
|
|
Packit |
b40e2e |
MACRO_abcd
|
|
Packit |
b40e2e |
|
|
Packit |
b40e2e |
/* { dg-do preprocess }
|
|
Packit |
b40e2e |
{ dg-options "-ansi -w" }
|
|
Packit |
b40e2e |
{ dg-final { if ![file exist n_3.i] { return } } }
|
|
Packit |
b40e2e |
{ dg-final { if \{ [grep n_3.i "abc de"] != "" \} \{ } }
|
|
Packit |
b40e2e |
{ dg-final { if \{ [grep n_3.i "abcd"] != "" \} \{ } }
|
|
Packit |
b40e2e |
{ dg-final { return \} \} } }
|
|
Packit |
b40e2e |
{ dg-final { fail "n_3.c: handling of comments" } }
|
|
Packit |
b40e2e |
*/
|