New test cases
From-SVN: r32785
This commit is contained in:
parent
1f58da7fe3
commit
02ff568ab9
9
gcc/testsuite/gcc.dg/cpp-hash1.c
Normal file
9
gcc/testsuite/gcc.dg/cpp-hash1.c
Normal file
@ -0,0 +1,9 @@
|
||||
/* Test for proper handling of # in object-like macros.
|
||||
From Linux kernel. */
|
||||
/* { dg-do preprocess } */
|
||||
|
||||
#define FIXUP .section ".fixup",#alloc,#execinstr
|
||||
|
||||
FIXUP
|
||||
|
||||
/* { dg-bogus "not followed by" "object-like #" { target *-*-* } 3 } */
|
15
gcc/testsuite/gcc.dg/cpp-hash2.c
Normal file
15
gcc/testsuite/gcc.dg/cpp-hash2.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* Test for erroneously thinking comments are token-pastes.
|
||||
From XFree86 4.0. */
|
||||
/* { dg-do preprocess } */
|
||||
/* { dg-options "-traditional" } */
|
||||
|
||||
#ifndef foo
|
||||
#define foo /**/
|
||||
#endif
|
||||
|
||||
#ifndef foo
|
||||
#define foo /* as nothing */
|
||||
#endif
|
||||
|
||||
/* { dg-bogus "(start|end) of macro" "/**/ at end" { target *-*-* } 7 } */
|
||||
/* { dg-bogus "(start|end) of macro" "comment at end" { target *-*-* } 11 } */
|
7
gcc/testsuite/gcc.dg/cpp-ifparen.c
Normal file
7
gcc/testsuite/gcc.dg/cpp-ifparen.c
Normal file
@ -0,0 +1,7 @@
|
||||
#if 2048 < (16 * (40) + 192)
|
||||
#error /* { dg-bogus "error" "with paren" } */
|
||||
#endif
|
||||
|
||||
#if 2048 < (16 * 40 + 192)
|
||||
#error /* { dg-bogus "error" "without paren" } */
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user