aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2007-06-30 13:06:45 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2007-06-30 13:06:45 +0000
commit1760a1a86bf459482fff422ef2e3fed4f28ac910 (patch)
tree0bf10e90290c83a4cb2b7735b8feebb6cc540856
parent72eb00bc31e1d1cd7fac7f24a3b1f105c9e0551e (diff)
downloadgcc-1760a1a86bf459482fff422ef2e3fed4f28ac910.zip
gcc-1760a1a86bf459482fff422ef2e3fed4f28ac910.tar.gz
gcc-1760a1a86bf459482fff422ef2e3fed4f28ac910.tar.bz2
re PR testsuite/25241 ([C++] DejaGNU does not distinguish between errors and warnings)
2007-06-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR testsuite/25241 testsuite/ * gcc.dg/cpp/20000625-1.c: Without dg-options the default is -pedantic-errors, so we should match errors. * gcc.dg/cpp/escape-1.c: Likewise. * gcc.dg/cpp/charconst.c: Empty character constants are errors. * gcc.dg/cpp/direct2.c: This is a mandatory error instead of a warning. * gcc.dg/cpp/endif-pedantic2.c: Use -pedantic-errors to obtain errors instead of warnings. * gcc.dg/cpp/extratokens.c: Use dg-warning instead of dg-error for a pedantic warning. * gcc.dg/cpp/arith-3.c: Likewise. From-SVN: r126146
-rw-r--r--gcc/testsuite/ChangeLog15
-rw-r--r--gcc/testsuite/gcc.dg/cpp/20000625-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/cpp/arith-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/charconst.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/direct2.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/escape-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/extratokens.c14
8 files changed, 37 insertions, 21 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 975939a..f97e1e0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,6 +1,21 @@
2007-06-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR testsuite/25241
+ * gcc.dg/cpp/20000625-1.c: Without dg-options the default is
+ -pedantic-errors, so we should match errors.
+ * gcc.dg/cpp/escape-1.c: Likewise.
+ * gcc.dg/cpp/charconst.c: Empty character constants are errors.
+ * gcc.dg/cpp/direct2.c: This is a mandatory error instead of a
+ warning.
+ * gcc.dg/cpp/endif-pedantic2.c: Use -pedantic-errors to obtain
+ errors instead of warnings.
+ * gcc.dg/cpp/extratokens.c: Use dg-warning instead of dg-error for
+ a pedantic warning.
+ * gcc.dg/cpp/arith-3.c: Likewise.
+
+2007-06-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR testsuite/25241
* gcc.dg/pch/valid-1.c: Match each diagnostic with its own directive.
* gcc.dg/pch/valid-2.c: Likewise.
* gcc.dg/pch/valid-3.c: Likewise.
diff --git a/gcc/testsuite/gcc.dg/cpp/20000625-1.c b/gcc/testsuite/gcc.dg/cpp/20000625-1.c
index ddfdb99..01ce98b 100644
--- a/gcc/testsuite/gcc.dg/cpp/20000625-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/20000625-1.c
@@ -1,3 +1,4 @@
+
/* Regression test for paste corner cases. Distilled from
syscall stub logic in glibc. */
@@ -11,6 +12,6 @@ main(void)
{
goto socket;
- ENTRY(socket) /* { dg-warning "valid preprocessing token" "" } */
+ ENTRY(socket) /* { dg-error "valid preprocessing token" "" } */
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/cpp/arith-3.c b/gcc/testsuite/gcc.dg/cpp/arith-3.c
index af01f9a..cc5fd1b 100644
--- a/gcc/testsuite/gcc.dg/cpp/arith-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/arith-3.c
@@ -143,13 +143,13 @@
#if UTARG_MAX /* { dg-warning "so large" } */
#endif
-#if UTARG_MAX_PLUS_1 /* { dg-error "too large" } */
+#if UTARG_MAX_PLUS_1 /* { dg-warning "too large" } */
#endif
-#if UTARG_MAX_PLUS_1_HEX /* { dg-error "too large" } */
+#if UTARG_MAX_PLUS_1_HEX /* { dg-warning "too large" } */
#endif
#if UTARG_MAX_HEX /* { dg-bogus "too large" } */
#endif
-#if UTARG_MAX_PLUS_1_OCT /* { dg-error "too large" } */
+#if UTARG_MAX_PLUS_1_OCT /* { dg-warning "too large" } */
#endif
#if UTARG_MAX_OCT /* { dg-bogus "too large" } */
#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/charconst.c b/gcc/testsuite/gcc.dg/cpp/charconst.c
index 07257a7..8934d6a 100644
--- a/gcc/testsuite/gcc.dg/cpp/charconst.c
+++ b/gcc/testsuite/gcc.dg/cpp/charconst.c
@@ -7,9 +7,9 @@
Neil Booth, 22 May 2001. */
-#if '' /* { dg-warning "empty" "empty charconst" } */
+#if '' /* { dg-error "empty" "empty charconst" } */
#endif
-#if L'' /* { dg-warning "empty" "empty wide charconst" } */
+#if L'' /* { dg-error "empty" "empty wide charconst" } */
#endif
#if 'very long' /* { dg-warning "too long" "long charconst" } */
#endif
@@ -24,8 +24,8 @@ void foo ()
int c;
__WCHAR_TYPE__ w;
- c = ''; /* { dg-warning "empty" "empty charconst" } */
- w = L''; /* { dg-warning "empty" "empty wide charconst" } */
+ c = ''; /* { dg-error "empty" "empty charconst" } */
+ w = L''; /* { dg-error "empty" "empty wide charconst" } */
c = 'very long'; /* { dg-warning "too long" "long charconst" } */
w = L'very long'; /* { dg-warning "too long" "long wide charconst" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/direct2.c b/gcc/testsuite/gcc.dg/cpp/direct2.c
index 136a0e2..5ea04da 100644
--- a/gcc/testsuite/gcc.dg/cpp/direct2.c
+++ b/gcc/testsuite/gcc.dg/cpp/direct2.c
@@ -43,4 +43,4 @@ void f ()
#define starslash *##/
slashstar starslash /* { dg-error "parse error|syntax error|expected" "not a comment" } */
-/* { dg-warning "does not give" "paste warning(s)" { target *-*-* } 45 } */
+/* { dg-error "does not give" "paste warning(s)" { target *-*-* } 45 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c b/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c
index d5c6eb9..55cc5eb 100644
--- a/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c
+++ b/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c
@@ -1,7 +1,7 @@
/* Copyright (C) 2002 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options "-Wno-endif-labels -pedantic" } */
+/* { dg-options "-Wno-endif-labels -pedantic-errors" } */
/* Tests combinations of -pedantic and -Wno-endif-labels; see extratokens2.c
for more general tests. */
diff --git a/gcc/testsuite/gcc.dg/cpp/escape-1.c b/gcc/testsuite/gcc.dg/cpp/escape-1.c
index 52d7414..0f5c11e 100644
--- a/gcc/testsuite/gcc.dg/cpp/escape-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/escape-1.c
@@ -9,11 +9,11 @@
#if '\x' /* { dg-error "no following" "\x with no digits" } */
#endif
-#if '\x400' /* { dg-warning "out of range" "\x out of range" } */
+#if '\x400' /* { dg-error "out of range" "\x out of range" } */
#endif
#if '\x0ff' /* { dg-bogus "out of range" "\x out of range" } */
#endif
-#if '\400' /* { dg-warning "out of range" "\x out of range" } */
+#if '\400' /* { dg-error "out of range" "\x out of range" } */
#endif
#if '\377' /* { dg-bogus "out of range" "bogus \x out of range" } */
#endif
@@ -30,9 +30,9 @@ void foo ()
int c;
c = '\x'; /* { dg-error "no following" "\x with no digits" } */
- c = '\x100'; /* { dg-warning "out of range" "\x out of range" } */
+ c = '\x100'; /* { dg-error "out of range" "\x out of range" } */
c = '\x0ff'; /* { dg-bogus "out of range" "\x out of range" } */
- c = '\400'; /* { dg-warning "out of range" "\x out of range" } */
+ c = '\400'; /* { dg-error "out of range" "\x out of range" } */
c = '\377'; /* { dg-bogus "out of range" "bogus \x out of range" } */
c = '\0377'; /* { dg-warning "multi" "too long octal" } */
c = '\p'; /* { dg-error "unknown escape" "unknown escape seq" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/extratokens.c b/gcc/testsuite/gcc.dg/cpp/extratokens.c
index c06a41d..ffbe7df 100644
--- a/gcc/testsuite/gcc.dg/cpp/extratokens.c
+++ b/gcc/testsuite/gcc.dg/cpp/extratokens.c
@@ -9,10 +9,10 @@
/* Source: Neil Booth, 4 Dec 2000. The combination of separate test
cases. */
-#ifdef foo bar /* { dg-error "extra tokens" "tokens after #ifdef" } */
+#ifdef foo bar /* { dg-warning "extra tokens" "tokens after #ifdef" } */
#endif
-#ifndef foo bar /* { dg-error "extra tokens" "tokens after #ifndef" } */
+#ifndef foo bar /* { dg-warning "extra tokens" "tokens after #ifndef" } */
#endif
#if 1
@@ -21,15 +21,15 @@
#endif / /* { dg-warning "extra tokens" "tokens after #endif" } */
#endif
-#undef foo bar /* { dg-error "extra tokens" "tokens after #undef" } */
+#undef foo bar /* { dg-warning "extra tokens" "tokens after #undef" } */
-#assert foo(bar) bar /* { dg-error "extra tokens" "tokens after #assert" } */
+#assert foo(bar) bar /* { dg-warning "extra tokens" "tokens after #assert" } */
-#unassert foo(bar) b /* { dg-error "extra tokens" "tokens after #unassert" } */
+#unassert foo(bar) b /* { dg-warning "extra tokens" "tokens after #unassert" } */
-#include "mi1c.h" bar /* { dg-error "extra tokens" "tokens after #include" } */
+#include "mi1c.h" bar /* { dg-warning "extra tokens" "tokens after #include" } */
-#ident "something" bar /* { dg-error "extra tokens" "tokens after #ident" } */
+#ident "something" bar /* { dg-warning "extra tokens" "tokens after #ident" } */
# 36 "file.c" 3