Commit a3ac63c4 by Marek Polacek Committed by Marek Polacek

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
parent 4e3bba8f
2014-10-02 Marek Polacek <polacek@redhat.com> 2014-10-02 Marek Polacek <polacek@redhat.com>
* 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 <polacek@redhat.com>
* gcc.dg/tree-prof/crossmodule-indircall-1.c: Fix defaulting to int. * gcc.dg/tree-prof/crossmodule-indircall-1.c: Fix defaulting to int.
* gcc.dg/tree-prof/crossmodule-indircall-1a.c: Likewise. * gcc.dg/tree-prof/crossmodule-indircall-1a.c: Likewise.
* gcc.dg/tree-prof/merge_block.c: Likewise. * gcc.dg/tree-prof/merge_block.c: Likewise.
......
/* Test for ICE when using typedef for bad type. */ /* Test for ICE when using typedef for bad type. */
/* Origin: Joseph Myers <jsm28@cam.ac.uk>. */ /* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
/* { dg-options "-std=gnu89" } */
void void
foo (void) foo (void)
......
/* PR c/18946 */ /* PR c/18946 */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-Wshadow" } */ /* { dg-options "-Wshadow -std=gnu89" } */
void bar (void) void bar (void)
{ {
......
f(void a,...){} /* { dg-error "has incomplete type" } */ void f(void a,...){} /* { dg-error "has incomplete type" } */
...@@ -22,6 +22,12 @@ struct PTP { ...@@ -22,6 +22,12 @@ struct PTP {
typedef struct PTP (u.p_tablep);/* { dg-error "expected" } */ typedef struct PTP (u.p_tablep);/* { dg-error "expected" } */
int pfree=0; int pfree=0;
int pcount=0; int pcount=0;
int Level1 ();
int Level2 ();
void enlarge_hash_table ();
int fill_item_entry ();
int __eprintf ();
void build_ptables ();
void void
mmu_walk_find(va) mmu_walk_find(va)
......
struct a *q; struct a *q;
void
f() f()
{ {
q++; /* { dg-error "pointer to" } */ q++; /* { dg-error "pointer to" } */
......
void
f () f ()
{ {
double b; double b;
......
int
main() main()
{ {
return (struct x) {{y: 0}}; /* { dg-error "extra|near|excess|incompatible|invalid" } */ return (struct x) {{y: 0}}; /* { dg-error "extra|near|excess|incompatible|invalid" } */
......
...@@ -14,6 +14,9 @@ union semun { ...@@ -14,6 +14,9 @@ union semun {
}; };
static union semun semctl_arg; static union semun semctl_arg;
static int semid; 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){ static void up(int sem){
struct sembuf sb; struct sembuf sb;
sb.sem_num = (unsigned short) sem; sb.sem_num = (unsigned short) sem;
......
/* { dg-options "-ffat-lto-objects" } */ /* { dg-options "-ffat-lto-objects" } */
void
asm_invalid_register_name() asm_invalid_register_name()
{ {
asm("":::"this_is_an_invalid_register_name"); /* { dg-error "unknown register" } */ asm("":::"this_is_an_invalid_register_name"); /* { dg-error "unknown register" } */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
parameters is not accepted. */ parameters is not accepted. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */ /* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "" } */ /* { dg-options "-std=gnu89" } */
void void
f(a) f(a)
......
...@@ -2,6 +2,7 @@ extern void abort (void); ...@@ -2,6 +2,7 @@ extern void abort (void);
extern void exit (int); extern void exit (int);
static int v = 3; static int v = 3;
void
f () f ()
{ {
int v = 4; int v = 4;
...@@ -12,6 +13,7 @@ f () ...@@ -12,6 +13,7 @@ f ()
} }
} }
int
main () main ()
{ {
f (); f ();
......
#include <stdarg.h> #include <stdarg.h>
void
f (int x, ...) f (int x, ...)
{ {
va_list args; va_list args;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment