diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/include2.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/include2a.c | 16 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/missing-header-1.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/counter-2.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-2.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/warn-1.c | 1 |
7 files changed, 30 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/include2.c b/gcc/testsuite/gcc.dg/cpp/include2.c index cda818ed5af..67f1065ae8c 100644 --- a/gcc/testsuite/gcc.dg/cpp/include2.c +++ b/gcc/testsuite/gcc.dg/cpp/include2.c @@ -8,9 +8,8 @@ /* Source: Neil Booth, 4 Nov 2000. */ #include <silly\>> /* { dg-error "extra tokens" "" } */ -#include "silly\"" /* { dg-error "extra tokens" "" } */ /* These error is No such file or directory, just once. However, this message is locale-dependent, so don't test for it. */ /* { dg-error "silly" "" { target *-*-* } 10 } */ -/* { dg-error "missing" "" { target *-*-* } 11 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/include2a.c b/gcc/testsuite/gcc.dg/cpp/include2a.c new file mode 100644 index 00000000000..974f3f33263 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/include2a.c @@ -0,0 +1,16 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. */ + +/* { dg-do preprocess } */ + +/* Tests that #include does not allow the terminating '>' or '"' to be + escaped, as per the standard. */ + +/* Source: Neil Booth, 4 Nov 2000. */ + +#include "silly\"" /* { dg-error "extra tokens" "" } */ + +/* These error is No such file or directory, just once. However, this + message is locale-dependent, so don't test for it. */ +/* { dg-error "silly" "" { target *-*-* } 10 } */ +/* { dg-error "missing" "" { target *-*-* } 10 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/missing-header-1.c b/gcc/testsuite/gcc.dg/cpp/missing-header-1.c new file mode 100644 index 00000000000..5445d4c4fec --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/missing-header-1.c @@ -0,0 +1,9 @@ +/* Test that missing headers are fatal errors. PR 15638. */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +#include "nonexistent.h" /* { dg-error "nonexistent.h" } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ + +/* This declaration should not receive any diagnostic. */ +foo bar; diff --git a/gcc/testsuite/gcc.dg/pch/counter-2.c b/gcc/testsuite/gcc.dg/pch/counter-2.c index 22ba245b698..6dd2245d7d8 100644 --- a/gcc/testsuite/gcc.dg/pch/counter-2.c +++ b/gcc/testsuite/gcc.dg/pch/counter-2.c @@ -10,6 +10,7 @@ #include "counter-2.h" /* { dg-warning "not used because `__COUNTER__' is invalid" } */ /* { dg-error "counter-2.h: No such file or directory" "no such file" { target *-*-* } 10 } */ /* { dg-error "one or more PCH files were found, but they were invalid" "invalid files" { target *-*-* } 10 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ int main(void) { diff --git a/gcc/testsuite/gcc.dg/pch/valid-1.c b/gcc/testsuite/gcc.dg/pch/valid-1.c index 1bf7d914467..3ee90916591 100644 --- a/gcc/testsuite/gcc.dg/pch/valid-1.c +++ b/gcc/testsuite/gcc.dg/pch/valid-1.c @@ -3,5 +3,6 @@ #include "valid-1.h"/* { dg-warning "created with -gnone, but used with -g" } */ /* { dg-error "No such file" "no such file" { target *-*-* } 3 } */ /* { dg-error "they were invalid" "invalid files" { target *-*-* } 3 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-2.c b/gcc/testsuite/gcc.dg/pch/valid-2.c index 4dbc4b2d37d..34269a87960 100644 --- a/gcc/testsuite/gcc.dg/pch/valid-2.c +++ b/gcc/testsuite/gcc.dg/pch/valid-2.c @@ -3,4 +3,5 @@ #include "valid-2.h" /* { dg-warning "settings for -fexceptions do not match" } */ /* { dg-error "No such file" "no such file" { target *-*-* } 3 } */ /* { dg-error "they were invalid" "invalid files" { target *-*-* } 3 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ int x; diff --git a/gcc/testsuite/gcc.dg/pch/warn-1.c b/gcc/testsuite/gcc.dg/pch/warn-1.c index eaa9cafc39a..64944c776d8 100644 --- a/gcc/testsuite/gcc.dg/pch/warn-1.c +++ b/gcc/testsuite/gcc.dg/pch/warn-1.c @@ -5,6 +5,7 @@ #include "warn-1.h"/* { dg-warning "not used because .DEFINED_VALUE. is defined" } */ /* { dg-error "No such file" "no such file" { target *-*-* } 5 } */ /* { dg-error "they were invalid" "invalid files" { target *-*-* } 5 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ int main(void) |