diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/include2.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/multiline-2.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/multiline.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/strify2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/trad/literals-2.c | 2 |
5 files changed, 19 insertions, 12 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/include2.c b/gcc/testsuite/gcc.dg/cpp/include2.c index 228963d..efeeb94 100644 --- a/gcc/testsuite/gcc.dg/cpp/include2.c +++ b/gcc/testsuite/gcc.dg/cpp/include2.c @@ -8,10 +8,9 @@ /* Source: Neil Booth, 4 Nov 2000. */ #include <silly\>> /* { dg-warning "extra tokens" "" } */ -#include "silly\"" /* { dg-error "missing" "" } */ +#include "silly\"" /* { dg-warning "extra tokens" "" } */ /* These first 2 errors are No such file or directory. However, this message is locale-dependent, so don't test for it. */ /* { dg-error "silly" "" { target *-*-* } 10 } */ /* { dg-error "silly" "" { target *-*-* } 11 } */ -/* { dg-warning "extra tokens" "" { target *-*-* } 11 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/multiline-2.c b/gcc/testsuite/gcc.dg/cpp/multiline-2.c new file mode 100644 index 0000000..6a674b4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/multiline-2.c @@ -0,0 +1,14 @@ +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. */ + +/* { dg-do compile } */ + +/* Test that multi-line tokens are rejected by the compiler. Source: + Neil Booth. */ + +const char *p = "line 1 +" +""; /* The compiler front end sees this. */ + +/* { dg-error "missing term" "multiline strings" { target *-*-* } 8 } */ +/* { dg-error "missing term" "multiline strings" { target *-*-* } 9 } */ + diff --git a/gcc/testsuite/gcc.dg/cpp/multiline.c b/gcc/testsuite/gcc.dg/cpp/multiline.c index e76ba04..103f9f6 100644 --- a/gcc/testsuite/gcc.dg/cpp/multiline.c +++ b/gcc/testsuite/gcc.dg/cpp/multiline.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. */ +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. */ /* { dg-do preprocess } */ /* { dg-options "-C" } */ /* Test that multi-line tokens are recognized by cpp0 as being @@ -22,11 +22,5 @@ L"line 1 { dg-final { if \{ [grep multiline.i "^$"] == "" \} \{ } } { dg-final { return \} } } { dg-final { fail "multiline.c: multi-line tokens" } } */ -/* { dg-error "missing term" "multiline strings" { target *-*-* } 11 } */ -/* { dg-error "missing term" "multiline strings" { target *-*-* } 14 } */ -/* { dg-error "missing term" "multiline strings" { target *-*-* } 15 } */ -/* { dg-error "missing term" "multiline strings" { target *-*-* } 18 } */ -/* { dg-bogus "warning" "warning in place of error" { target *-*-* } 11 } */ -/* { dg-bogus "warning" "warning in place of error" { target *-*-* } 14 } */ +/* { dg-bogus "missing term" "multiline strings" { target *-*-* } 11 } */ /* { dg-bogus "warning" "warning in place of error" { target *-*-* } 15 } */ -/* { dg-bogus "warning" "warning in place of error" { target *-*-* } 18 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/strify2.c b/gcc/testsuite/gcc.dg/cpp/strify2.c index c24220c..2c768dc 100644 --- a/gcc/testsuite/gcc.dg/cpp/strify2.c +++ b/gcc/testsuite/gcc.dg/cpp/strify2.c @@ -1,7 +1,7 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. */ /* { dg-do run } */ -/* { dg-options "-std=c99 -pedantic-errors" } */ +/* { dg-options "-std=c99 -pedantic-errors -fno-show-column" } */ /* Tests a whole bunch of things are correctly stringified. */ diff --git a/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c b/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c index 807bb0d..29ffcbf 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c +++ b/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c @@ -3,6 +3,6 @@ /* { dg-do preprocess } */ -/* { dg-error "missing terminating" "bad charconst" { target *-*-* } 7 } */ +/* { dg-error "not valid" "bad charconst" { target *-*-* } 7 } */ #if 'x #endif |