From: Marek Polacek Date: Thu, 2 Oct 2014 17:57:01 +0000 (+0000) Subject: 20020130-1.c: Use -std=gnu89. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3ac63c46fd51fd3a531ae08e9f457e89e5744f9;p=gcc.git 20020130-1.c: Use -std=gnu89. * gcc.dg/noncompile/20020130-1.c: Use -std=gnu89. * gcc.dg/noncompile/20050120-1.c: Likewise. * gcc.dg/noncompile/old-style-parm-2.c: Likewise. * gcc.dg/noncompile/920616-2.c: Fix defaulting to int. * gcc.dg/noncompile/930301-1.c: Likewise. * gcc.dg/noncompile/930622-1.c: Likewise. * gcc.dg/noncompile/930622-2.c: Likewise. * gcc.dg/noncompile/950825-1.c: Likewise. * gcc.dg/noncompile/invalid_asm.c: Likewise. * gcc.dg/noncompile/scope.c: Likewise. * gcc.dg/noncompile/va-arg-1.c: Likewise. * gcc.dg/noncompile/920923-1.c: Fix implicit declarations. * gcc.dg/noncompile/971104-1.c: Likewise. From-SVN: r215811 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index db9d29c03f5..760471c450d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2014-10-02 Marek Polacek + + * gcc.dg/noncompile/20020130-1.c: Use -std=gnu89. + * gcc.dg/noncompile/20050120-1.c: Likewise. + * gcc.dg/noncompile/old-style-parm-2.c: Likewise. + * gcc.dg/noncompile/920616-2.c: Fix defaulting to int. + * gcc.dg/noncompile/930301-1.c: Likewise. + * gcc.dg/noncompile/930622-1.c: Likewise. + * gcc.dg/noncompile/930622-2.c: Likewise. + * gcc.dg/noncompile/950825-1.c: Likewise. + * gcc.dg/noncompile/invalid_asm.c: Likewise. + * gcc.dg/noncompile/scope.c: Likewise. + * gcc.dg/noncompile/va-arg-1.c: Likewise. + * gcc.dg/noncompile/920923-1.c: Fix implicit declarations. + * gcc.dg/noncompile/971104-1.c: Likewise. + 2014-10-02 Marek Polacek * gcc.dg/tree-prof/crossmodule-indircall-1.c: Fix defaulting to int. diff --git a/gcc/testsuite/gcc.dg/noncompile/20020130-1.c b/gcc/testsuite/gcc.dg/noncompile/20020130-1.c index d820e062e71..61669b9c00b 100644 --- a/gcc/testsuite/gcc.dg/noncompile/20020130-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/20020130-1.c @@ -1,5 +1,6 @@ /* Test for ICE when using typedef for bad type. */ /* Origin: Joseph Myers . */ +/* { dg-options "-std=gnu89" } */ void foo (void) diff --git a/gcc/testsuite/gcc.dg/noncompile/20050120-1.c b/gcc/testsuite/gcc.dg/noncompile/20050120-1.c index 4af84b6f22a..ed38bc64c13 100644 --- a/gcc/testsuite/gcc.dg/noncompile/20050120-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/20050120-1.c @@ -1,6 +1,6 @@ /* PR c/18946 */ /* { dg-do compile } */ -/* { dg-options "-Wshadow" } */ +/* { dg-options "-Wshadow -std=gnu89" } */ void bar (void) { diff --git a/gcc/testsuite/gcc.dg/noncompile/920616-2.c b/gcc/testsuite/gcc.dg/noncompile/920616-2.c index 25f59434f73..e43d00981f4 100644 --- a/gcc/testsuite/gcc.dg/noncompile/920616-2.c +++ b/gcc/testsuite/gcc.dg/noncompile/920616-2.c @@ -1 +1 @@ -f(void a,...){} /* { dg-error "has incomplete type" } */ +void f(void a,...){} /* { dg-error "has incomplete type" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/920923-1.c b/gcc/testsuite/gcc.dg/noncompile/920923-1.c index ccd1dc3a782..1cb140ebabc 100644 --- a/gcc/testsuite/gcc.dg/noncompile/920923-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/920923-1.c @@ -22,6 +22,12 @@ struct PTP { typedef struct PTP (u.p_tablep);/* { dg-error "expected" } */ int pfree=0; int pcount=0; +int Level1 (); +int Level2 (); +void enlarge_hash_table (); +int fill_item_entry (); +int __eprintf (); +void build_ptables (); void mmu_walk_find(va) diff --git a/gcc/testsuite/gcc.dg/noncompile/930301-1.c b/gcc/testsuite/gcc.dg/noncompile/930301-1.c index afabd1513dd..b36f00f3af1 100644 --- a/gcc/testsuite/gcc.dg/noncompile/930301-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/930301-1.c @@ -1,4 +1,5 @@ struct a *q; +void f() { q++; /* { dg-error "pointer to" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/930622-1.c b/gcc/testsuite/gcc.dg/noncompile/930622-1.c index 835e072c655..93567a9e4b9 100644 --- a/gcc/testsuite/gcc.dg/noncompile/930622-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/930622-1.c @@ -1,3 +1,4 @@ +void f () { double b; diff --git a/gcc/testsuite/gcc.dg/noncompile/930622-2.c b/gcc/testsuite/gcc.dg/noncompile/930622-2.c index 5e02d8951c4..f289bf80944 100644 --- a/gcc/testsuite/gcc.dg/noncompile/930622-2.c +++ b/gcc/testsuite/gcc.dg/noncompile/930622-2.c @@ -1,3 +1,4 @@ +void f () { int i; diff --git a/gcc/testsuite/gcc.dg/noncompile/950825-1.c b/gcc/testsuite/gcc.dg/noncompile/950825-1.c index 43dca2f103e..4e3d6fbc1e0 100644 --- a/gcc/testsuite/gcc.dg/noncompile/950825-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/950825-1.c @@ -1,3 +1,4 @@ +int main() { return (struct x) {{y: 0}}; /* { dg-error "extra|near|excess|incompatible|invalid" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/971104-1.c b/gcc/testsuite/gcc.dg/noncompile/971104-1.c index 722b71c784f..39e00c60fc2 100644 --- a/gcc/testsuite/gcc.dg/noncompile/971104-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/971104-1.c @@ -14,6 +14,9 @@ union semun { }; static union semun semctl_arg; static int semid; +int semop(int semid, struct sembuf *sops, unsigned nsops); +void error (const char *); +int semctl(int semid, int semnum, int cmd, ...); static void up(int sem){ struct sembuf sb; sb.sem_num = (unsigned short) sem; diff --git a/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c b/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c index d1d4b364b8e..fdb029605b7 100644 --- a/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c +++ b/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c @@ -1,4 +1,5 @@ /* { dg-options "-ffat-lto-objects" } */ +void asm_invalid_register_name() { asm("":::"this_is_an_invalid_register_name"); /* { dg-error "unknown register" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c b/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c index 1b156b770f7..f481f4a71bc 100644 --- a/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c +++ b/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c @@ -2,7 +2,7 @@ parameters is not accepted. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu89" } */ void f(a) diff --git a/gcc/testsuite/gcc.dg/noncompile/scope.c b/gcc/testsuite/gcc.dg/noncompile/scope.c index 7f09c27cffd..67e136fd97d 100644 --- a/gcc/testsuite/gcc.dg/noncompile/scope.c +++ b/gcc/testsuite/gcc.dg/noncompile/scope.c @@ -2,6 +2,7 @@ extern void abort (void); extern void exit (int); static int v = 3; +void f () { int v = 4; @@ -12,6 +13,7 @@ f () } } +int main () { f (); diff --git a/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c b/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c index b8b7d3c31cf..f36a492e53d 100644 --- a/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c @@ -1,5 +1,6 @@ #include +void f (int x, ...) { va_list args;