From: Marek Polacek Date: Thu, 2 Oct 2014 17:57:01 +0000 (+0000) Subject: 20020130-1.c: Use -std=gnu89. X-Git-Tag: releases/gcc-5.1.0~4323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3ac63c46fd51fd3a531ae08e9f457e89e5744f9;p=thirdparty%2Fgcc.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 db9d29c03f5c..760471c450d4 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 d820e062e719..61669b9c00b5 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 4af84b6f22a7..ed38bc64c13c 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 25f59434f73d..e43d00981f40 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 ccd1dc3a7829..1cb140ebabc8 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 afabd1513dd6..b36f00f3af17 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 835e072c655d..93567a9e4b90 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 5e02d8951c4c..f289bf809441 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 43dca2f103eb..4e3d6fbc1e07 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 722b71c784f8..39e00c60fc2e 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 d1d4b364b8e6..fdb029605b7a 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 1b156b770f77..f481f4a71bc3 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 7f09c27cffd8..67e136fd97da 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 b8b7d3c31cfe..f36a492e53d4 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;