diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/noncompile')
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/20001228-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/20020213-1.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/20020220-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/920507-1.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/921102-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/971104-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/990416-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/incomplete-2.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/init-4.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/label-1.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/redecl-1.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/scope.c | 2 |
13 files changed, 22 insertions, 19 deletions
diff --git a/gcc/testsuite/gcc.dg/noncompile/20001228-1.c b/gcc/testsuite/gcc.dg/noncompile/20001228-1.c index 79efe117aac..73a44a859a5 100644 --- a/gcc/testsuite/gcc.dg/noncompile/20001228-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/20001228-1.c @@ -1,6 +1,6 @@ void rof(void) { union { int a; } u; - for (u.a = 0; u; u.a++) /* { dg-error "invalid operand" } */ + for (u.a = 0; u; u.a++) /* { dg-error "used union" } */ ; } diff --git a/gcc/testsuite/gcc.dg/noncompile/20020213-1.c b/gcc/testsuite/gcc.dg/noncompile/20020213-1.c index 77798b57c4b..c1de5663ace 100644 --- a/gcc/testsuite/gcc.dg/noncompile/20020213-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/20020213-1.c @@ -24,8 +24,8 @@ int main () return 0; } -/* { dg-warning "passing arg 2 of" "2nd incompatible" { target *-*-* } 15 } */ -/* { dg-warning "passing arg 1 of" "1st incompatible" { target *-*-* } 16 } */ -/* { dg-warning "passing arg 2 of" "2nd incompatible" { target *-*-* } 16 } */ -/* { dg-warning "passing arg 1 of" "1st incompatible" { target *-*-* } 18 } */ -/* { dg-warning "passing arg 1 of" "1st incompatible" { target *-*-* } 20 } */ +/* { dg-warning "passing argument 2 of" "2nd incompatible" { target *-*-* } 15 } */ +/* { dg-warning "passing argument 1 of" "1st incompatible" { target *-*-* } 16 } */ +/* { dg-warning "passing argument 2 of" "2nd incompatible" { target *-*-* } 16 } */ +/* { dg-warning "passing argument 1 of" "1st incompatible" { target *-*-* } 18 } */ +/* { dg-warning "passing argument 1 of" "1st incompatible" { target *-*-* } 20 } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/20020220-1.c b/gcc/testsuite/gcc.dg/noncompile/20020220-1.c index c455f7e9d30..aa57dc3d493 100644 --- a/gcc/testsuite/gcc.dg/noncompile/20020220-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/20020220-1.c @@ -6,7 +6,7 @@ int foo (const char*, const char*); void bar (void) { const char *s = "bar"; - int i; /* { dg-error "previously declared here" } */ + int i; /* { dg-error "previous declaration" } */ int size = 2; int i = foo (s, s + size); /* { dg-error "redeclaration of" } */ } diff --git a/gcc/testsuite/gcc.dg/noncompile/920507-1.c b/gcc/testsuite/gcc.dg/noncompile/920507-1.c index 64ddce7f1ff..c1a3523008c 100644 --- a/gcc/testsuite/gcc.dg/noncompile/920507-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/920507-1.c @@ -1,6 +1,7 @@ -void +int * x(void) { register int *a asm("unknown_register"); /* { dg-error "invalid register" } */ int *v[1] = {a}; + return v[1]; } diff --git a/gcc/testsuite/gcc.dg/noncompile/921102-1.c b/gcc/testsuite/gcc.dg/noncompile/921102-1.c index 8b66f712ef7..ef04b1b2aae 100644 --- a/gcc/testsuite/gcc.dg/noncompile/921102-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/921102-1.c @@ -1 +1 @@ -int x[]={[0.3 ... 4.6]9}; /* { dg-error "nonconstant array|near init" } */ +int x[]={[0.3 ... 4.6]9}; /* { dg-error "not of integer type|near init" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/971104-1.c b/gcc/testsuite/gcc.dg/noncompile/971104-1.c index ed7cb523c3b..54337b209c9 100644 --- a/gcc/testsuite/gcc.dg/noncompile/971104-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/971104-1.c @@ -1,3 +1,4 @@ +extern int printf(const char *, ...); typedef unsigned short ushort; struct sembuf { ushort sem_num; diff --git a/gcc/testsuite/gcc.dg/noncompile/990416-1.c b/gcc/testsuite/gcc.dg/noncompile/990416-1.c index 6b69ead2fe1..72aa3cd131c 100644 --- a/gcc/testsuite/gcc.dg/noncompile/990416-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/990416-1.c @@ -1,3 +1,4 @@ +extern void *memcpy (void *, const void *, __SIZE_TYPE__); typedef int word_type; static void diff --git a/gcc/testsuite/gcc.dg/noncompile/incomplete-2.c b/gcc/testsuite/gcc.dg/noncompile/incomplete-2.c index 19864b9b353..0c707e3729a 100644 --- a/gcc/testsuite/gcc.dg/noncompile/incomplete-2.c +++ b/gcc/testsuite/gcc.dg/noncompile/incomplete-2.c @@ -6,7 +6,7 @@ int g95_type_for_mode (enum machine_mode); int -g95_type_for_mode (enum machine_mode mode) -{ /* { dg-error "has incomplete type" } */ +g95_type_for_mode (enum machine_mode mode) /* { dg-error "incomplete type" } */ +{ return 0; } diff --git a/gcc/testsuite/gcc.dg/noncompile/init-4.c b/gcc/testsuite/gcc.dg/noncompile/init-4.c index 906c115b8cc..2d8bef3cb01 100644 --- a/gcc/testsuite/gcc.dg/noncompile/init-4.c +++ b/gcc/testsuite/gcc.dg/noncompile/init-4.c @@ -1,3 +1,2 @@ struct a { char *b; } c[D] /* { dg-error "undeclared" } */ - = /* { dg-error "storage size" } */ - { { "" } } ; /* { dg-warning "braces around scalar initializer|near" } */ + = { { "" } } ; /* { dg-warning "braces around scalar initializer|near" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/label-1.c b/gcc/testsuite/gcc.dg/noncompile/label-1.c index c646b48fb8d..e9bde7b3b7b 100644 --- a/gcc/testsuite/gcc.dg/noncompile/label-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/label-1.c @@ -28,7 +28,7 @@ void c(void) /* can't have two labels with the same name in the same function */ void d(void) { - l: dummy(); /* { dg-error "previously defined" "prev def same scope" } */ + l: dummy(); /* { dg-error "previous definition" "prev def same scope" } */ l: dummy(); /* { dg-error "duplicate label" "dup label same scope" } */ goto l; } @@ -36,7 +36,7 @@ void d(void) /* even at different scopes */ void e(void) { - l: dummy(); /* { dg-error "previously defined" "prev def diff scope" } */ + l: dummy(); /* { dg-error "previous definition" "prev def diff scope" } */ { l: dummy(); /* { dg-error "duplicate label" "dup label diff scope" } */ } @@ -150,7 +150,7 @@ void m(void) void n(void) { - __label__ l; /* { dg-error "previously declared" "outer label decl" } */ + __label__ l; /* { dg-error "previous declaration" "outer label decl" } */ void nest(void) { l: goto l; /* { dg-error "duplicate label" "inner label defn" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c b/gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c index 0c5599434f8..76d4d96edaf 100644 --- a/gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c @@ -4,7 +4,7 @@ void foo(int i) { - my_label: /* { dg-error "previously defined" "prev label" } */ + my_label: /* { dg-error "previous definition" "prev label" } */ i++; diff --git a/gcc/testsuite/gcc.dg/noncompile/redecl-1.c b/gcc/testsuite/gcc.dg/noncompile/redecl-1.c index f4db95013e2..416c258c0d4 100644 --- a/gcc/testsuite/gcc.dg/noncompile/redecl-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/redecl-1.c @@ -5,6 +5,5 @@ int foo () { int bar; /* { dg-error "previous.*decl" "previous.*decl" } */ - volatile int bar; /* { dg-error "conflicting types" "conflicting types" } */ + volatile int bar; /* { dg-error "conflicting type qualifiers" "conflicting type qualifiers" } */ } - diff --git a/gcc/testsuite/gcc.dg/noncompile/scope.c b/gcc/testsuite/gcc.dg/noncompile/scope.c index 0bfc3f284db..7f09c27cffd 100644 --- a/gcc/testsuite/gcc.dg/noncompile/scope.c +++ b/gcc/testsuite/gcc.dg/noncompile/scope.c @@ -1,3 +1,5 @@ +extern void abort (void); +extern void exit (int); static int v = 3; f () |