From 72eb00bc31e1d1cd7fac7f24a3b1f105c9e0551e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Sat, 30 Jun 2007 13:02:48 +0000 Subject: [PATCH] re PR testsuite/25241 ([C++] DejaGNU does not distinguish between errors and warnings) 2007-06-30 Manuel Lopez-Ibanez PR testsuite/25241 testsuite/ * 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. * gcc.dg/pch/warn-1.c: Likewise. * gcc.dg/pch/valid-4.c: Match a warning instead of an error. From-SVN: r126145 --- gcc/testsuite/ChangeLog | 9 +++++++++ gcc/testsuite/gcc.dg/pch/valid-1.c | 4 +++- gcc/testsuite/gcc.dg/pch/valid-2.c | 5 +++-- gcc/testsuite/gcc.dg/pch/valid-3.c | 5 +++-- gcc/testsuite/gcc.dg/pch/valid-4.c | 2 +- gcc/testsuite/gcc.dg/pch/warn-1.c | 5 ++++- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5367e3f1028..975939a396f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2007-06-30 Manuel Lopez-Ibanez + + 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. + * gcc.dg/pch/warn-1.c: Likewise. + * gcc.dg/pch/valid-4.c: Match a warning instead of an error. + 2007-06-30 Manuel Lopez-Ibanez PR c/4076 diff --git a/gcc/testsuite/gcc.dg/pch/valid-1.c b/gcc/testsuite/gcc.dg/pch/valid-1.c index ebfa85a9949..256ed8f7ff7 100644 --- a/gcc/testsuite/gcc.dg/pch/valid-1.c +++ b/gcc/testsuite/gcc.dg/pch/valid-1.c @@ -1,5 +1,7 @@ /* { dg-options "-I. -Winvalid-pch -g" } */ -#include "valid-1.h"/* { dg-error "created with -gnone, but used with -g|No such file|they were invalid" } */ +#include "valid-1.h"/* { dg-warning "created with -gnone, but used with -g" } */ +/* { dg-error "No such file" "" { target *-*-* } 3 } */ +/* { dg-error "they were invalid" "" { target *-*-* } 3 } */ int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-2.c b/gcc/testsuite/gcc.dg/pch/valid-2.c index 52a2e35a441..3ae18188084 100644 --- a/gcc/testsuite/gcc.dg/pch/valid-2.c +++ b/gcc/testsuite/gcc.dg/pch/valid-2.c @@ -1,5 +1,6 @@ /* { dg-options "-I. -Winvalid-pch -fexceptions" } */ -#include "valid-2.h"/* { dg-error "settings for -fexceptions do not match|No such file|they were invalid" } */ - +#include "valid-2.h" /* { dg-warning "settings for -fexceptions do not match" } */ +/* { dg-error "No such file" "" { target *-*-* } 3 } */ +/* { dg-error "they were invalid" "" { target *-*-* } 3 } */ int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-3.c b/gcc/testsuite/gcc.dg/pch/valid-3.c index 741a917df5d..9ee3f7da484 100644 --- a/gcc/testsuite/gcc.dg/pch/valid-3.c +++ b/gcc/testsuite/gcc.dg/pch/valid-3.c @@ -1,5 +1,6 @@ /* { dg-options "-I. -Winvalid-pch -fno-unit-at-a-time" } */ -#include "valid-3.h"/* { dg-error "settings for -funit-at-a-time do not match|No such file|they were invalid" } */ - +#include "valid-3.h"/* { dg-warning "settings for -funit-at-a-time do not match" } */ +/* { dg-error "No such file" "" { target *-*-* } 3 } */ +/* { dg-error "they were invalid" "" { target *-*-* } 3 } */ int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-4.c b/gcc/testsuite/gcc.dg/pch/valid-4.c index 1249531ef67..e4419b57079 100644 --- a/gcc/testsuite/gcc.dg/pch/valid-4.c +++ b/gcc/testsuite/gcc.dg/pch/valid-4.c @@ -2,5 +2,5 @@ #include "valid-4.h" -char * x = "??/"; /* { dg-error "trigraph" } */ +char * x = "??/"; /* { dg-warning "trigraph" } */ diff --git a/gcc/testsuite/gcc.dg/pch/warn-1.c b/gcc/testsuite/gcc.dg/pch/warn-1.c index 6e895818c63..c841bae4950 100644 --- a/gcc/testsuite/gcc.dg/pch/warn-1.c +++ b/gcc/testsuite/gcc.dg/pch/warn-1.c @@ -2,7 +2,10 @@ #define DEFINED_VALUE 3 -#include "warn-1.h"/* { dg-error "not used because `DEFINED_VALUE' is defined|No such file|they were invalid" } */ +#include "warn-1.h"/* { dg-warning "not used because .DEFINED_VALUE. is defined" } */ +/* { dg-error "No such file" "" { target *-*-* } 5 } */ +/* { dg-error "they were invalid" "" { target *-*-* } 5 } */ + int main(void) {