diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/pr29612-1.c | 15 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/pr29612-2.c | 18 |
3 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7a5a719..8c072e2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2006-12-29 Jakub Jelinek <jakub@redhat.com> + + PR preprocessor/29612 + * gcc.dg/cpp/pr29612-1.c: New test. + * gcc.dg/cpp/pr29612-2.c: New test. + 2006-12-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/30034 diff --git a/gcc/testsuite/gcc.dg/cpp/pr29612-1.c b/gcc/testsuite/gcc.dg/cpp/pr29612-1.c new file mode 100644 index 0000000..f840c38 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/pr29612-1.c @@ -0,0 +1,15 @@ +/* PR preprocessor/29612 */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +# 6 "pr29612-1.c" + +int foo (void) { return 'ab'; } /* { dg-warning "multi-character" } */ + +# 1 "foo.h" 1 3 + +int bar (void) { return 'ab'; } /* No warning in system header. */ + +# 14 "pr29612-1.c" 2 + +int baz (void) { return 'ab'; } /* { dg-warning "multi-character" } */ diff --git a/gcc/testsuite/gcc.dg/cpp/pr29612-2.c b/gcc/testsuite/gcc.dg/cpp/pr29612-2.c new file mode 100644 index 0000000..813eb77 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/pr29612-2.c @@ -0,0 +1,18 @@ +/* PR preprocessor/29612 */ +/* { dg-do preprocess } */ +/* { dg-options "-Wtraditional -fno-show-column" } */ + +# 6 "pr29612-2.c" + +#if 1U /* { dg-warning "traditional C rejects" "numeric constant suffix" } */ +#endif + +# 1 "foo.h" 1 3 + +#if 1U +#endif /* No warning in system header. */ + +# 16 "pr29612-2.c" 2 + +#if 1U /* { dg-warning "traditional C rejects" "numeric constant suffix" } */ +#endif |