diff mbox

gcc.dg/ cleanup

Message ID 20141006114338.GR3503@redhat.com
State New
Headers show

Commit Message

Marek Polacek Oct. 6, 2014, 11:43 a.m. UTC
This patch is a cleanup of the rest of the tests in gcc.dg/ directory that
haven't been fixed in previous patches.
See https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02656.html for more info.

Tested on x86_64-linux: vanilla results == results with this patch ==
results with this patch and gnu11 as a default.

Applying to trunk.

2014-10-06  Marek Polacek  <polacek@redhat.com>

	* gcc.dg/20001012-1.c: Fix defaulting to int.
	* gcc.dg/20001012-2.c: Likewise.
	* gcc.dg/20001108-1.c: Likewise.
	* gcc.dg/20010516-1.c: Likewise.
	* gcc.dg/20011008-2.c: Likewise.
	* gcc.dg/20030612-1.c: Likewise.
	* gcc.dg/20040219-1.c: Likewise.
	* gcc.dg/20050603-2.c: Likewise.
	* gcc.dg/20070507-1.c: Likewise.
	* gcc.dg/attr-alias-3.c: Likewise.
	* gcc.dg/fastmath-1.c: Likewise.
	* gcc.dg/fork-instrumentation.c: Likewise.
	* gcc.dg/fwrapv-1.c: Likewise.
	* gcc.dg/fwrapv-2.c: Likewise.
	* gcc.dg/memmove-1.c: Likewise.
	* gcc.dg/non-local-goto-1.c: Likewise.
	* gcc.dg/non-local-goto-2.c: Likewise.
	* gcc.dg/noreturn-8.c: Likewise.
	* gcc.dg/parse-decl-after-if.c: Likewise.
	* gcc.dg/parse-decl-after-label.c: Likewise.
	* gcc.dg/pr25795-1.c: Likewise.
	* gcc.dg/pr25795.c: Likewise.
	* gcc.dg/pr28574.c: Likewise.
	* gcc.dg/pr30189.c: Likewise.
	* gcc.dg/pr31529-2.c: Likewise.
	* gcc.dg/pr33923.c: Likewise.
	* gcc.dg/pr34263.c: Likewise.
	* gcc.dg/pr36194.c: Likewise.
	* gcc.dg/pr45415.c: Likewise.
	* gcc.dg/pr47443.c: Likewise.
	* gcc.dg/pr47763.c: Likewise.
	* gcc.dg/pr49000.c: Likewise.
	* gcc.dg/pr50340.c: Likewise.
	* gcc.dg/webizer.c: Likewise.
	* gcc.dg/pr59940.c: Likewise.
	* gcc.dg/pr63186.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-int.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-int128.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-longlong.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-short.c: Likewise.
	* gcc.dg/simulate-thread/atomic-other-int.c: Likewise.
	* gcc.dg/sms-1.c: Likewise.
	* gcc.dg/unused-3.c: Likewise.
	* gcc.dg/varpool-1.c: Likewise.
	* gcc.dg/pr35899.c: Use -std=gnu89.
	* gcc.dg/pr59963-1.c: Likewise.
	* gcc.dg/redecl-15.c: Likewise.
	* gcc.dg/20041213-1.c: Likewise.
	* gcc.dg/20080820.c: Likewise.
	* gcc.dg/920413-1.c: Likewise.
	* gcc.dg/Wold-style-definition-1.c: Likewise.
	* gcc.dg/Wmissing-parameter-type-no.c: Likewise.
	* gcc.dg/decl-nospec-1.c: Likewise.
	* gcc.dg/decl-nospec-2.c: Likewise.
	* gcc.dg/decl-nospec-3.c: Likewise.
	* gcc.dg/bitfld-1.c: Likewise.
	* gcc.dg/bitfld-9.c: Likewise.
	* gcc.dg/parm-impl-decl-1.c: Likewise.
	* gcc.dg/parm-impl-decl-3.c: Likewise.
	* gcc.dg/pr18596-1.c: Likewise.
	* gcc.dg/pr18596-2.c: Likewise.
	* gcc.dg/pr18596-3.c: Likewise.
	* gcc.dg/pr60139.c: Likewise.
	* gcc.dg/utf-dflt.c: Likewise.
	* gcc.dg/utf-dflt2.c: Likewise.
	* gcc.dg/wtr-func-def-1.c: Likewise.
	* gcc.dg/declspec-5.c: Likewise.
	* gcc.dg/declspec-6.c: Likewise.
	* gcc.dg/ftrapv-2.c: Likewise.
	* gcc.dg/20020430-1.c: Fix implicit declarations.
	* gcc.dg/20030702-1.c: Likewise.
	* gcc.dg/20040127-2.c: Likewise.
	* gcc.dg/20041122-1.c: Likewise.
	* gcc.dg/20050309-1.c: Likewise.
	* gcc.dg/20061026.c: Likewise.
	* gcc.dg/20101010-1.c: Likewise.
	* gcc.dg/Werror-1.c: Likewise.
	* gcc.dg/Werror-10.c: Likewise.
	* gcc.dg/Werror-11.c: Likewise.
	* gcc.dg/Werror-12.c: Likewise.
	* gcc.dg/Werror-2.c: Likewise.
	* gcc.dg/Werror-3.c: Likewise.
	* gcc.dg/Werror-4.c: Likewise.
	* gcc.dg/Werror-5.c: Likewise.
	* gcc.dg/Werror-6.c: Likewise.
	* gcc.dg/Werror-7.c: Likewise.
	* gcc.dg/Werror-8.c: Likewise.
	* gcc.dg/Wstrict-overflow-20.c: Likewise.
	* gcc.dg/cpp/trad/macroargs.c: Likewise.
	* gcc.dg/delay-slot-2.c: Likewise.
	* gcc.dg/errno-1.c: Likewise.
	* gcc.dg/globalalias.c: Likewise.
	* gcc.dg/inline-3.c: Likewise.
	* gcc.dg/localalias.c: Likewise.
	* gcc.dg/pr19633-1.c: Likewise.
	* gcc.dg/pr19633.c: Likewise.
	* gcc.dg/pr23408.c: Likewise.
	* gcc.dg/pr23470-1.c: Likewise.
	* gcc.dg/pr28121.c: Likewise.
	* gcc.dg/pr28243.c: Likewise.
	* gcc.dg/pr30260.c: Likewise.
	* gcc.dg/pr32573.c: Likewise.
	* gcc.dg/pr33826.c: Likewise.
	* gcc.dg/pr35065.c: Likewise.
	* gcc.dg/pr38616.c: Likewise.
	* gcc.dg/pr39867.c: Likewise.
	* gcc.dg/pr41470.c: Likewise.
	* gcc.dg/pr41837.c: Likewise.
	* gcc.dg/pr44024.c: Likewise.
	* gcc.dg/pr44699.c: Likewise.
	* gcc.dg/pr46252.c: Likewise.
	* gcc.dg/pr46878-1.c: Likewise.
	* gcc.dg/pr50908-3.c: Likewise.
	* gcc.dg/pr51796.c: Likewise.
	* gcc.dg/pr55150-2.c: Likewise.
	* gcc.dg/pr55833.c: Likewise.
	* gcc.dg/pr59350.c: Likewise.
	* gcc.dg/pr59418.c: Likewise.
	* gcc.dg/pr60647-2.c: Likewise.
	* gcc.dg/uninit-suppress.c: Likewise.
	* gcc.dg/uninit-suppress_2.c: Likewise.
	* gcc.dg/20030805-1.c: Use -fgnu89-inline.
	* gcc.dg/always_inline.c: Likewise.
	* gcc.dg/always_inline2.c: Likewise.
	* gcc.dg/always_inline3.c: Likewise.
	* gcc.dg/builtin-apply4.c: Likewise.
	* gcc.dg/declspec-7.c: Likewise.
	* gcc.dg/inline-1.c: Likewise.
	* gcc.dg/va-arg-pack-1.c: Likewise.
	* gcc.dg/winline-2.c: Likewise.
	* gcc.dg/winline-3.c: Likewise.
	* gcc.dg/winline-5.c: Likewise.
	* gcc.dg/winline-6.c: Likewise.
	* gcc.dg/winline-7.c: Likewise.
	* gcc.dg/funcorder.c: Fix implicit declarations.  Fix defaulting to
	int. 
	* gcc.dg/inline-33.c: Likewise.
	* gcc.dg/pr27861-1.c: Likewise.
	* gcc.dg/pr28888.c: Likewise.
	* gcc.dg/pr29254.c: Likewise.
	* gcc.dg/pr50908.c: Likewise.
	* gcc.dg/pr60647-1.c: Likewise.
	* gcc.dg/pragma-diag-1.c: Likewise.
	* gcc.dg/pr31529-1.c: Use -fgnu89-inline.  Fix defaulting to int.
	* gcc.dg/winline-9.c: Likewise.
	* gcc.dg/pr52808.c: Return 0 instead of nothing.


	Marek
diff mbox

Patch

diff --git gcc/gcc/testsuite/gcc.dg/20001012-1.c gcc/gcc/testsuite/gcc.dg/20001012-1.c
index eda69c0..c59169b 100644
--- gcc/gcc/testsuite/gcc.dg/20001012-1.c
+++ gcc/gcc/testsuite/gcc.dg/20001012-1.c
@@ -10,6 +10,7 @@  foo (void)
   return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d);
 }
 
+int
 main ()
 {
   if (foo() != 1.0)
diff --git gcc/gcc/testsuite/gcc.dg/20001012-2.c gcc/gcc/testsuite/gcc.dg/20001012-2.c
index 32dc27c..629ae1b 100644
--- gcc/gcc/testsuite/gcc.dg/20001012-2.c
+++ gcc/gcc/testsuite/gcc.dg/20001012-2.c
@@ -28,6 +28,7 @@  double baz (const char *x)
   return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d);
 }
 
+int
 main ()
 {
   if (baz("") != 1.0)
diff --git gcc/gcc/testsuite/gcc.dg/20001108-1.c gcc/gcc/testsuite/gcc.dg/20001108-1.c
index 682257f..1fc3e98 100644
--- gcc/gcc/testsuite/gcc.dg/20001108-1.c
+++ gcc/gcc/testsuite/gcc.dg/20001108-1.c
@@ -25,6 +25,7 @@  long bar (long i, double x)
   return foo (x);
 }
 
+int
 main()
 {
   if (bar (0, 2.0) != 26)
diff --git gcc/gcc/testsuite/gcc.dg/20010516-1.c gcc/gcc/testsuite/gcc.dg/20010516-1.c
index 6ddabd0..fbafe98 100644
--- gcc/gcc/testsuite/gcc.dg/20010516-1.c
+++ gcc/gcc/testsuite/gcc.dg/20010516-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-options "-fshow-column" } */
 
+void
 foo()
 {
       char d;
diff --git gcc/gcc/testsuite/gcc.dg/20011008-2.c gcc/gcc/testsuite/gcc.dg/20011008-2.c
index 01ff172..0ea0229 100644
--- gcc/gcc/testsuite/gcc.dg/20011008-2.c
+++ gcc/gcc/testsuite/gcc.dg/20011008-2.c
@@ -7,6 +7,7 @@  extern void exit (int);
 struct { union {int x; int y;}; int q; } b;
 union { struct {int x;}; int q; } e;
 
+int
 main()
 {
   b.y = 10;
diff --git gcc/gcc/testsuite/gcc.dg/20020430-1.c gcc/gcc/testsuite/gcc.dg/20020430-1.c
index 8fcdfba..63915a2 100644
--- gcc/gcc/testsuite/gcc.dg/20020430-1.c
+++ gcc/gcc/testsuite/gcc.dg/20020430-1.c
@@ -105,6 +105,11 @@  typedef struct _RectObjRec {
 typedef struct _RectObjRec *RectObj;
 
 SmeObject DoGetEventEntry();
+int XtWidgetToApplicationContext();
+void XtAppError();
+void Unhighlight();
+void XtMoveWidget();
+void XWarpPointer();
 
 SmeObject
 GetEventEntry(Widget w, XEvent *event)
diff --git gcc/gcc/testsuite/gcc.dg/20030612-1.c gcc/gcc/testsuite/gcc.dg/20030612-1.c
index f087512..00db20a 100644
--- gcc/gcc/testsuite/gcc.dg/20030612-1.c
+++ gcc/gcc/testsuite/gcc.dg/20030612-1.c
@@ -14,6 +14,7 @@  void foo()
   });
 }
 
+int
 main()
 {
   B = 5;
diff --git gcc/gcc/testsuite/gcc.dg/20030702-1.c gcc/gcc/testsuite/gcc.dg/20030702-1.c
index b530c69..1516a5a 100644
--- gcc/gcc/testsuite/gcc.dg/20030702-1.c
+++ gcc/gcc/testsuite/gcc.dg/20030702-1.c
@@ -4,6 +4,8 @@ 
 /* { dg-options "-O2 -fpic -fprofile-arcs" } */
 /* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */
 
+int fork (void);
+
 void test (void)
 {
   fork ();
diff --git gcc/gcc/testsuite/gcc.dg/20030805-1.c gcc/gcc/testsuite/gcc.dg/20030805-1.c
index 6297c5d..286b922 100644
--- gcc/gcc/testsuite/gcc.dg/20030805-1.c
+++ gcc/gcc/testsuite/gcc.dg/20030805-1.c
@@ -1,7 +1,7 @@ 
 /* Test that gcc understands that the call to g might clobber i.  */
 
 /* { dg-do run } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fgnu89-inline" } */
 
 __inline int f ()
 {
diff --git gcc/gcc/testsuite/gcc.dg/20040127-2.c gcc/gcc/testsuite/gcc.dg/20040127-2.c
index 6e56dd8..ec76226 100644
--- gcc/gcc/testsuite/gcc.dg/20040127-2.c
+++ gcc/gcc/testsuite/gcc.dg/20040127-2.c
@@ -8,6 +8,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O" } */
 
+void Get16u();
 typedef struct { int ThumbnailSize; } ImageInfo_t;
 
 double ConvertAnyFormat(void)
diff --git gcc/gcc/testsuite/gcc.dg/20040219-1.c gcc/gcc/testsuite/gcc.dg/20040219-1.c
index 1a277d6..1c9254a 100644
--- gcc/gcc/testsuite/gcc.dg/20040219-1.c
+++ gcc/gcc/testsuite/gcc.dg/20040219-1.c
@@ -14,6 +14,7 @@  double foo(double a, double b, double c)
 	return (a+b+c);
 }
 
+int
 main ()
 {
 	double  f1, f2, f3, f4, f5, f6, f7, f8, f9,f10;
diff --git gcc/gcc/testsuite/gcc.dg/20041122-1.c gcc/gcc/testsuite/gcc.dg/20041122-1.c
index 2d9facc..b2120f8 100644
--- gcc/gcc/testsuite/gcc.dg/20041122-1.c
+++ gcc/gcc/testsuite/gcc.dg/20041122-1.c
@@ -1,6 +1,8 @@ 
 /* PR rtl-optimization/18611 */
 /* { dg-do compile } */
 /* { dg-options "-O1 -fmove-loop-invariants" } */
+
+void dumpCineonChannelInfo ();
 typedef struct {
 	int channels_per_image;
 	int channel[8];
diff --git gcc/gcc/testsuite/gcc.dg/20041213-1.c gcc/gcc/testsuite/gcc.dg/20041213-1.c
index aeff744..490b6bc 100644
--- gcc/gcc/testsuite/gcc.dg/20041213-1.c
+++ gcc/gcc/testsuite/gcc.dg/20041213-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-fshow-column" } */
+/* { dg-options "-fshow-column -std=gnu89" } */
 /* test redeclarations with void and implicit int */
 extern foo1(); /* { dg-message "8:note: previous declaration" } */
 extern void foo1(); /* { dg-error "13:conflicting types" } */
diff --git gcc/gcc/testsuite/gcc.dg/20050309-1.c gcc/gcc/testsuite/gcc.dg/20050309-1.c
index 8e11bc5..46b27f8 100644
--- gcc/gcc/testsuite/gcc.dg/20050309-1.c
+++ gcc/gcc/testsuite/gcc.dg/20050309-1.c
@@ -5,6 +5,10 @@ 
 /* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-O2 -fprofile-generate" } */
 
+void lookup ();
+int hash ();
+void error ();
+
 char *
 test(char *ret, int *counter, void *schema,
      const char* name, const char *namespace,
diff --git gcc/gcc/testsuite/gcc.dg/20050603-2.c gcc/gcc/testsuite/gcc.dg/20050603-2.c
index 363e3cd..8c8e58e 100644
--- gcc/gcc/testsuite/gcc.dg/20050603-2.c
+++ gcc/gcc/testsuite/gcc.dg/20050603-2.c
@@ -12,6 +12,8 @@  void set (struct s*, int) __attribute__((noinline));
 void set (struct s* p, int flags) {
   p->g = flags << 1;
 }
+
+int
 main() {
   struct s foo = {0 , 0, 3, 0};
   set (&foo, -1);
diff --git gcc/gcc/testsuite/gcc.dg/20061026.c gcc/gcc/testsuite/gcc.dg/20061026.c
index fb3de23..741ea2e 100644
--- gcc/gcc/testsuite/gcc.dg/20061026.c
+++ gcc/gcc/testsuite/gcc.dg/20061026.c
@@ -6,6 +6,8 @@ 
    large for a 16bit constant and therefore should reserve the literal
    pool base pointer.  */
 
+void g ();
+
 int f () {
   char a[32608];
 
diff --git gcc/gcc/testsuite/gcc.dg/20070507-1.c gcc/gcc/testsuite/gcc.dg/20070507-1.c
index 2884d1a..684002f 100644
--- gcc/gcc/testsuite/gcc.dg/20070507-1.c
+++ gcc/gcc/testsuite/gcc.dg/20070507-1.c
@@ -36,7 +36,7 @@  int __attribute__((noinline)) foo (char *p_str1)
 
 int __attribute__((noinline)) loop_next (int *p_table, char *p_table_head)
 {
-  static loop_next = 0;
+  static int loop_next = 0;
 
   if (loop_next == 1)
     return 1;
diff --git gcc/gcc/testsuite/gcc.dg/20080820.c gcc/gcc/testsuite/gcc.dg/20080820.c
index 002edb1..badab9a 100644
--- gcc/gcc/testsuite/gcc.dg/20080820.c
+++ gcc/gcc/testsuite/gcc.dg/20080820.c
@@ -1,4 +1,4 @@ 
 /* { dg-do compile } */
-/* { dg-options "-fshow-column -fms-extensions -pedantic" } */
+/* { dg-options "-fshow-column -fms-extensions -pedantic -std=gnu89" } */
 
 struct { struct a { int x; }; int bar; } hot; /* { dg-warning "29:ISO C90 doesn't support unnamed" } */
diff --git gcc/gcc/testsuite/gcc.dg/20101010-1.c gcc/gcc/testsuite/gcc.dg/20101010-1.c
index 8d74bbf..cd8fddf 100644
--- gcc/gcc/testsuite/gcc.dg/20101010-1.c
+++ gcc/gcc/testsuite/gcc.dg/20101010-1.c
@@ -1,6 +1,9 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-crossjumping" } */
 
+int bar1 ();
+int bar2 ();
+
 int foo (void)
 {
   int len;
diff --git gcc/gcc/testsuite/gcc.dg/920413-1.c gcc/gcc/testsuite/gcc.dg/920413-1.c
index 6e8fff7..c2699fe 100644
--- gcc/gcc/testsuite/gcc.dg/920413-1.c
+++ gcc/gcc/testsuite/gcc.dg/920413-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-Wtraditional" } */
+/* { dg-options "-Wtraditional -std=gnu89" } */
 
 int
 x (b)
diff --git gcc/gcc/testsuite/gcc.dg/Werror-1.c gcc/gcc/testsuite/gcc.dg/Werror-1.c
index 001af24..88553e7 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-1.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-1.c
@@ -9,6 +9,7 @@ 
 
 #pragma GCC diagnostic error "-Waddress"
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-error ".* attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-10.c gcc/gcc/testsuite/gcc.dg/Werror-10.c
index dced20c..c5b2b4b 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-10.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-10.c
@@ -6,6 +6,7 @@ 
 
 #pragma GCC diagnostic error "-Waddress"
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-error ".* attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-11.c gcc/gcc/testsuite/gcc.dg/Werror-11.c
index 3fb892e..6e44219 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-11.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-11.c
@@ -6,6 +6,7 @@ 
 
 #pragma GCC diagnostic warning "-Waddress"
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-error ".* attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-12.c gcc/gcc/testsuite/gcc.dg/Werror-12.c
index 4f0bd17..a87bf69 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-12.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-12.c
@@ -5,6 +5,7 @@ 
 
 #pragma GCC diagnostic ignored "-Waddress"
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-warning "attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-2.c gcc/gcc/testsuite/gcc.dg/Werror-2.c
index 65f285e..32a7b33 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-2.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-2.c
@@ -4,6 +4,7 @@ 
 /* This one is the baseline.  Make sure with no option we get no
    warnings.  */
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-warning ".* attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-3.c gcc/gcc/testsuite/gcc.dg/Werror-3.c
index 9787407..76e0680 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-3.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-3.c
@@ -3,6 +3,7 @@ 
 
 /* Make sure the command line option enables the warning.  */
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-warning ".* attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-4.c gcc/gcc/testsuite/gcc.dg/Werror-4.c
index 73687be..8550523 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-4.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-4.c
@@ -5,6 +5,7 @@ 
 
 #pragma GCC diagnostic error "-Waddress"
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-warning "attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-5.c gcc/gcc/testsuite/gcc.dg/Werror-5.c
index c03fc3b..8e90193 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-5.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-5.c
@@ -4,6 +4,7 @@ 
 
 /* Make sure -Werror turns warnings in to errors.  */
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-error ".* attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-6.c gcc/gcc/testsuite/gcc.dg/Werror-6.c
index a99c13b..0818ae3 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-6.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-6.c
@@ -3,6 +3,7 @@ 
 /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 /* Make sure -Werror=foo emits an error and not a warning */
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-warning ".* attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-7.c gcc/gcc/testsuite/gcc.dg/Werror-7.c
index bafb5c9..ce28cdc 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-7.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-7.c
@@ -4,6 +4,7 @@ 
 
 /* Make sure -Wno-error= overrides -Werror.  */
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-error ".* attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Werror-8.c gcc/gcc/testsuite/gcc.dg/Werror-8.c
index 23079ce..9698593 100644
--- gcc/gcc/testsuite/gcc.dg/Werror-8.c
+++ gcc/gcc/testsuite/gcc.dg/Werror-8.c
@@ -5,6 +5,7 @@ 
 
 #pragma GCC diagnostic warning "-Waddress"
 
+void grill ();
 void __attribute__((dj)) bar() { }	/* { dg-warning ".* attribute directive ignored" } */
 
 int i;
diff --git gcc/gcc/testsuite/gcc.dg/Wmissing-parameter-type-no.c gcc/gcc/testsuite/gcc.dg/Wmissing-parameter-type-no.c
index 1031e57a..45e5e42 100644
--- gcc/gcc/testsuite/gcc.dg/Wmissing-parameter-type-no.c
+++ gcc/gcc/testsuite/gcc.dg/Wmissing-parameter-type-no.c
@@ -1,6 +1,6 @@ 
 /* Test that we can disable -Wmissing-parameter-type */
 /* { dg-do compile } */
-/* { dg-options "-Wall -Wextra -Wno-missing-parameter-type" } */
+/* { dg-options "-Wall -Wextra -Wno-missing-parameter-type -std=gnu89" } */
 
 int foo(bar) { return bar;} /* { dg-bogus "type of 'bar' defaults to 'int'" } */
 
diff --git gcc/gcc/testsuite/gcc.dg/Wold-style-definition-1.c gcc/gcc/testsuite/gcc.dg/Wold-style-definition-1.c
index aa01633..01d3ffb 100644
--- gcc/gcc/testsuite/gcc.dg/Wold-style-definition-1.c
+++ gcc/gcc/testsuite/gcc.dg/Wold-style-definition-1.c
@@ -2,7 +2,7 @@ 
 
 /* Origin: Andreas Jaeger <aj@suse.de> */
 /* { dg-do compile } */
-/* { dg-options "-Wold-style-definition" } */
+/* { dg-options "-Wold-style-definition -std=gnu89" } */
 
 void
 bar (a) int a; { } /* { dg-warning "old-style function definition" } */
diff --git gcc/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c gcc/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c
index 207162d..ae2db93 100644
--- gcc/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c
+++ gcc/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c
@@ -4,6 +4,8 @@ 
 /* Don't warn about an overflow in a copied loop header.  We used to
    get a warning in value numbering.  This is PR 33565.  */
 
+void do_something ();
+
 void f (int m, int n)
 {
   int j;
diff --git gcc/gcc/testsuite/gcc.dg/always_inline.c gcc/gcc/testsuite/gcc.dg/always_inline.c
index 482a0a2..8603bc6 100644
--- gcc/gcc/testsuite/gcc.dg/always_inline.c
+++ gcc/gcc/testsuite/gcc.dg/always_inline.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fgnu89-inline" } */
 #include <stdarg.h>
 inline __attribute__ ((always_inline)) void
 e(int t, ...) /* { dg-error "variable argument lists" } */
diff --git gcc/gcc/testsuite/gcc.dg/always_inline2.c gcc/gcc/testsuite/gcc.dg/always_inline2.c
index 4f1634e..297159b 100644
--- gcc/gcc/testsuite/gcc.dg/always_inline2.c
+++ gcc/gcc/testsuite/gcc.dg/always_inline2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fgnu89-inline" } */
 inline __attribute__ ((always_inline)) void t(void); /* { dg-error "body not available" } */
 void
 q(void)
diff --git gcc/gcc/testsuite/gcc.dg/always_inline3.c gcc/gcc/testsuite/gcc.dg/always_inline3.c
index 80ea314..5d55e4d 100644
--- gcc/gcc/testsuite/gcc.dg/always_inline3.c
+++ gcc/gcc/testsuite/gcc.dg/always_inline3.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fgnu89-inline" } */
 int do_something_evil (void);
 inline __attribute__ ((always_inline)) void
 q2(void) /* { dg-error "recursive inlining" } */
diff --git gcc/gcc/testsuite/gcc.dg/attr-alias-3.c gcc/gcc/testsuite/gcc.dg/attr-alias-3.c
index 6ff1b47..4c6f390 100644
--- gcc/gcc/testsuite/gcc.dg/attr-alias-3.c
+++ gcc/gcc/testsuite/gcc.dg/attr-alias-3.c
@@ -51,6 +51,7 @@  static void lf4(void) {}
 extern ftype Af4a __attribute__((alias ("lf4")));
 static ftype *pf4a = &Af4a;
 
+int
 main() {
 #ifdef __mips
   /* Use real asm for MIPS, to stop the assembler warning about
diff --git gcc/gcc/testsuite/gcc.dg/bitfld-1.c gcc/gcc/testsuite/gcc.dg/bitfld-1.c
index fa835f2..2493670 100644
--- gcc/gcc/testsuite/gcc.dg/bitfld-1.c
+++ gcc/gcc/testsuite/gcc.dg/bitfld-1.c
@@ -5,7 +5,7 @@ 
    Source: Neil Booth, 26 Jan 2002.
 */
 
-/* { dg-options -pedantic } */
+/* { dg-options "-pedantic -std=gnu89" } */
 
 enum foo {e1 = 0, e2, e3, e4, e5};
 
diff --git gcc/gcc/testsuite/gcc.dg/builtin-apply4.c gcc/gcc/testsuite/gcc.dg/builtin-apply4.c
index 530da71..c2cedfb 100644
--- gcc/gcc/testsuite/gcc.dg/builtin-apply4.c
+++ gcc/gcc/testsuite/gcc.dg/builtin-apply4.c
@@ -1,5 +1,5 @@ 
 /* PR tree-optimization/20076 */
-/* { dg-options "-O2 -Wmissing-noreturn" } */
+/* { dg-options "-O2 -Wmissing-noreturn -fgnu89-inline" } */
 /* { dg-options "-O2 -mno-mmx" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
 /* { dg-do run } */
 
diff --git gcc/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c gcc/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c
index c5f91d9..9ecfa31 100644
--- gcc/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c
+++ gcc/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c
@@ -7,6 +7,7 @@ 
 #define g(x) x
 
 extern void abort (void);
+extern int strcmp (const char *, const char *);
 
 void testquoting ()
 {
diff --git gcc/gcc/testsuite/gcc.dg/declspec-7.c gcc/gcc/testsuite/gcc.dg/declspec-7.c
index 3701724..10623e4 100644
--- gcc/gcc/testsuite/gcc.dg/declspec-7.c
+++ gcc/gcc/testsuite/gcc.dg/declspec-7.c
@@ -4,7 +4,7 @@ 
    gcc.dg/tls/diag-*.c.  */
 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-fgnu89-inline" } */
 
 /* Duplicate specifiers.  */
 
diff --git gcc/gcc/testsuite/gcc.dg/delay-slot-2.c gcc/gcc/testsuite/gcc.dg/delay-slot-2.c
index 79faf81..d8619aa 100644
--- gcc/gcc/testsuite/gcc.dg/delay-slot-2.c
+++ gcc/gcc/testsuite/gcc.dg/delay-slot-2.c
@@ -6,6 +6,7 @@ 
 
 extern int printf (__const char *__restrict __format, ...);
 extern void print_c_condition (const char *);
+extern void print_host_wide_int (long);
 
 enum decision_type
 {
diff --git gcc/gcc/testsuite/gcc.dg/errno-1.c gcc/gcc/testsuite/gcc.dg/errno-1.c
index 295deef..46236ef 100644
--- gcc/gcc/testsuite/gcc.dg/errno-1.c
+++ gcc/gcc/testsuite/gcc.dg/errno-1.c
@@ -4,6 +4,8 @@ 
 #include <errno.h>
 #include <stdlib.h>
 
+void do_not_optimize_away ();
+
 int main()
 {
   void * volatile p;
diff --git gcc/gcc/testsuite/gcc.dg/fastmath-1.c gcc/gcc/testsuite/gcc.dg/fastmath-1.c
index 4efe430..ed4f37f 100644
--- gcc/gcc/testsuite/gcc.dg/fastmath-1.c
+++ gcc/gcc/testsuite/gcc.dg/fastmath-1.c
@@ -9,6 +9,7 @@  if ( ( dists [ 0 ] > 0 ) == ( dists [ 1 ] > 0 ) )
   return k;
 return 0;
 } 
+int
 main() {
   float dists[16] = { 0., 1., 1., 0., 0., -1., -1., 0.,
 		     1., 1., 1., -1., -1., 1., -1., -1. };
diff --git gcc/gcc/testsuite/gcc.dg/fork-instrumentation.c gcc/gcc/testsuite/gcc.dg/fork-instrumentation.c
index bd9bf41..f875e18 100644
--- gcc/gcc/testsuite/gcc.dg/fork-instrumentation.c
+++ gcc/gcc/testsuite/gcc.dg/fork-instrumentation.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O0 -fprofile-generate" } */
 int fork(void);
+int
 t()
 {
   fork ();
diff --git gcc/gcc/testsuite/gcc.dg/funcorder.c gcc/gcc/testsuite/gcc.dg/funcorder.c
index 0dec72c..9e4d8de 100644
--- gcc/gcc/testsuite/gcc.dg/funcorder.c
+++ gcc/gcc/testsuite/gcc.dg/funcorder.c
@@ -4,15 +4,17 @@ 
 /*  In unit-at-time the functions should be assembled in order
     e q t main, so we realize that they are pure.  */
  
+void link_error (void);
 static int mem;
 static int e(void) __attribute__ ((noinline));
 static int q(void) __attribute__ ((noinline));
 static int t(void) __attribute__ ((noinline));
+int
 main()
 {
 	return t();
 }
-static t()
+static int t()
 {
 	int r,e;
 	if (mem)
diff --git gcc/gcc/testsuite/gcc.dg/fwrapv-1.c gcc/gcc/testsuite/gcc.dg/fwrapv-1.c
index f7ddda4..a172b3b 100644
--- gcc/gcc/testsuite/gcc.dg/fwrapv-1.c
+++ gcc/gcc/testsuite/gcc.dg/fwrapv-1.c
@@ -17,6 +17,7 @@  int test(int x)
   return (2*x)/2;
 }
 
+int
 main()
 {
   int x = INT_MAX;
diff --git gcc/gcc/testsuite/gcc.dg/fwrapv-2.c gcc/gcc/testsuite/gcc.dg/fwrapv-2.c
index cb4270e..e260e54 100644
--- gcc/gcc/testsuite/gcc.dg/fwrapv-2.c
+++ gcc/gcc/testsuite/gcc.dg/fwrapv-2.c
@@ -17,6 +17,7 @@  int test(int x)
   return (2*x)/2;
 }
 
+int
 main()
 {
   int x = INT_MAX;
diff --git gcc/gcc/testsuite/gcc.dg/globalalias.c gcc/gcc/testsuite/gcc.dg/globalalias.c
index 2c6ae51..fc6c7aa 100644
--- gcc/gcc/testsuite/gcc.dg/globalalias.c
+++ gcc/gcc/testsuite/gcc.dg/globalalias.c
@@ -11,6 +11,7 @@ 
    { dg-additional-sources "globalalias-2.c" } */
 extern int test2count;
 extern void abort (void);
+extern void tt ();
 int testcount;
 static
 void test(void)
diff --git gcc/gcc/testsuite/gcc.dg/inline-1.c gcc/gcc/testsuite/gcc.dg/inline-1.c
index 4dce611..06059b9 100644
--- gcc/gcc/testsuite/gcc.dg/inline-1.c
+++ gcc/gcc/testsuite/gcc.dg/inline-1.c
@@ -1,6 +1,6 @@ 
 /* Verify that DECL_INLINE gets copied between DECLs properly.  */
 /* { dg-do compile } */
-/* { dg-options "-O1" } */
+/* { dg-options "-O1 -fgnu89-inline" } */
 /* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "xyzzy?,%r" } else { scan-assembler-not "xyzzy" } } } */
 
 /* Test that declaration followed by definition inlines.  */
diff --git gcc/gcc/testsuite/gcc.dg/inline-3.c gcc/gcc/testsuite/gcc.dg/inline-3.c
index a3de193..8173ae9 100644
--- gcc/gcc/testsuite/gcc.dg/inline-3.c
+++ gcc/gcc/testsuite/gcc.dg/inline-3.c
@@ -1,5 +1,7 @@ 
 /* { dg-options "-O2 -funit-at-a-time" } */
 /* { dg-final { scan-assembler-not "big_function_2" } } */
+
+int t(void);
 static void
 big_function_2(void);
 void
diff --git gcc/gcc/testsuite/gcc.dg/inline-33.c gcc/gcc/testsuite/gcc.dg/inline-33.c
index d82ff71..a05130e 100644
--- gcc/gcc/testsuite/gcc.dg/inline-33.c
+++ gcc/gcc/testsuite/gcc.dg/inline-33.c
@@ -5,7 +5,9 @@ 
 int i;
 
 int foo ();
+int bar ();
 
+int
 main ()
 {
   return foo (i);
diff --git gcc/gcc/testsuite/gcc.dg/localalias.c gcc/gcc/testsuite/gcc.dg/localalias.c
index 6384875..fb62066 100644
--- gcc/gcc/testsuite/gcc.dg/localalias.c
+++ gcc/gcc/testsuite/gcc.dg/localalias.c
@@ -11,6 +11,7 @@ 
    { dg-require-alias "" }
    { dg-additional-sources "localalias-2.c" } */
 extern void abort (void);
+extern void tt (void);
 extern int test2count;
 int testcount;
 __attribute__ ((weak,noinline))
diff --git gcc/gcc/testsuite/gcc.dg/memmove-1.c gcc/gcc/testsuite/gcc.dg/memmove-1.c
index 46918ee..498cf60 100644
--- gcc/gcc/testsuite/gcc.dg/memmove-1.c
+++ gcc/gcc/testsuite/gcc.dg/memmove-1.c
@@ -11,6 +11,7 @@  domem (void *dest, const void *src, int len)
 {
 	__builtin_memmove (dest, src, len);
 }
+int
 t()
 {
 	domem (b,a,100);
diff --git gcc/gcc/testsuite/gcc.dg/non-local-goto-1.c gcc/gcc/testsuite/gcc.dg/non-local-goto-1.c
index 2bace07..9c2e6cc 100644
--- gcc/gcc/testsuite/gcc.dg/non-local-goto-1.c
+++ gcc/gcc/testsuite/gcc.dg/non-local-goto-1.c
@@ -5,14 +5,14 @@  extern void abort (void);
 
 int global;
 
-static foo(void) __attribute__((noinline));
+static int foo(void) __attribute__((noinline));
 
-static foo(void)
+static int foo(void)
 {
   global = 1;
 }
 
-static bar(void)
+static int bar(void)
 {
   foo ();
 }
diff --git gcc/gcc/testsuite/gcc.dg/non-local-goto-2.c gcc/gcc/testsuite/gcc.dg/non-local-goto-2.c
index 24ed650..99fb105 100644
--- gcc/gcc/testsuite/gcc.dg/non-local-goto-2.c
+++ gcc/gcc/testsuite/gcc.dg/non-local-goto-2.c
@@ -5,14 +5,14 @@  extern void abort (void);
 
 int global;
 
-static foo(void) __attribute__((noinline));
+static int foo(void) __attribute__((noinline));
 
-static foo(void)
+static int foo(void)
 {
   global = 1;
 }
 
-static bar(void)
+static int bar(void)
 {
   foo ();
   global = 0;
diff --git gcc/gcc/testsuite/gcc.dg/noreturn-8.c gcc/gcc/testsuite/gcc.dg/noreturn-8.c
index 1e75633..294800b 100644
--- gcc/gcc/testsuite/gcc.dg/noreturn-8.c
+++ gcc/gcc/testsuite/gcc.dg/noreturn-8.c
@@ -2,7 +2,7 @@ 
 /* { dg-options "-O2" } */
 void exit (int);
 void noreturn_autodetection_failed ();
-__attribute__ ((noinline))
+__attribute__ ((noinline)) int
 detect_noreturn ()
 {
   exit (0);
diff --git gcc/gcc/testsuite/gcc.dg/parm-impl-decl-1.c gcc/gcc/testsuite/gcc.dg/parm-impl-decl-1.c
index 467c19a..5c7ddb0 100644
--- gcc/gcc/testsuite/gcc.dg/parm-impl-decl-1.c
+++ gcc/gcc/testsuite/gcc.dg/parm-impl-decl-1.c
@@ -2,7 +2,7 @@ 
    function prototypes.  Bug 18239.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu89" } */
 
 /* Implicit function declaration in attribute in definition (testcase
    from bug).  */
diff --git gcc/gcc/testsuite/gcc.dg/parm-impl-decl-3.c gcc/gcc/testsuite/gcc.dg/parm-impl-decl-3.c
index b3941b9..9042952 100644
--- gcc/gcc/testsuite/gcc.dg/parm-impl-decl-3.c
+++ gcc/gcc/testsuite/gcc.dg/parm-impl-decl-3.c
@@ -1,7 +1,7 @@ 
 /* Like parm-impl-decl-1.c, but with -g.  PR 43381.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
-/* { dg-options "-g" } */
+/* { dg-options "-g -std=gnu89" } */
 
 int
 foo (int __attribute__ ((__mode__ (vector_size(8)))) i) /* { dg-warning "'__mode__' attribute ignored" } */
diff --git gcc/gcc/testsuite/gcc.dg/parse-decl-after-if.c gcc/gcc/testsuite/gcc.dg/parse-decl-after-if.c
index f48e6df..09afa37 100644
--- gcc/gcc/testsuite/gcc.dg/parse-decl-after-if.c
+++ gcc/gcc/testsuite/gcc.dg/parse-decl-after-if.c
@@ -3,7 +3,7 @@ 
 { dg-options "-fsyntax-only" }
 */
 
-void f(x)
+void f(int x)
 {
   if (x > 1)
     int ret = 1; /* { dg-error "expected expression before 'int'" } */
diff --git gcc/gcc/testsuite/gcc.dg/parse-decl-after-label.c gcc/gcc/testsuite/gcc.dg/parse-decl-after-label.c
index f457c6a..9c9886a 100644
--- gcc/gcc/testsuite/gcc.dg/parse-decl-after-label.c
+++ gcc/gcc/testsuite/gcc.dg/parse-decl-after-label.c
@@ -3,7 +3,7 @@ 
 { dg-options "-fsyntax-only" }
 */
 
-int f(x)
+int f(int x)
 {
   if (x > 1) 
     {
diff --git gcc/gcc/testsuite/gcc.dg/pr18596-1.c gcc/gcc/testsuite/gcc.dg/pr18596-1.c
index dc34f44..0d8d290 100644
--- gcc/gcc/testsuite/gcc.dg/pr18596-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr18596-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-fno-unit-at-a-time" } */
+/* { dg-options "-fno-unit-at-a-time -std=gnu89" } */
 
 int f(int i)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr18596-2.c gcc/gcc/testsuite/gcc.dg/pr18596-2.c
index 7a52e80..9b50d01 100644
--- gcc/gcc/testsuite/gcc.dg/pr18596-2.c
+++ gcc/gcc/testsuite/gcc.dg/pr18596-2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-funit-at-a-time" } */
+/* { dg-options "-funit-at-a-time -std=gnu89" } */
 
 int f(int i)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr18596-3.c gcc/gcc/testsuite/gcc.dg/pr18596-3.c
index 74a6e63..c04312f 100644
--- gcc/gcc/testsuite/gcc.dg/pr18596-3.c
+++ gcc/gcc/testsuite/gcc.dg/pr18596-3.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu89" } */
 
 int foo ()
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr19633-1.c gcc/gcc/testsuite/gcc.dg/pr19633-1.c
index c05e46a..53c3935 100644
--- gcc/gcc/testsuite/gcc.dg/pr19633-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr19633-1.c
@@ -2,6 +2,7 @@ 
 /* { dg-options "-O2" } */
 
 extern void abort (void);
+extern void link_error (void);
 
 struct S
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr19633.c gcc/gcc/testsuite/gcc.dg/pr19633.c
index fda0df6..66a542a 100644
--- gcc/gcc/testsuite/gcc.dg/pr19633.c
+++ gcc/gcc/testsuite/gcc.dg/pr19633.c
@@ -12,6 +12,9 @@  struct T
   struct S s;
 };
 
+void link_error (void);
+int bar (struct S, int);
+
 void
 foo (int a, struct T b)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr23408.c gcc/gcc/testsuite/gcc.dg/pr23408.c
index ca8193f..b552e23 100644
--- gcc/gcc/testsuite/gcc.dg/pr23408.c
+++ gcc/gcc/testsuite/gcc.dg/pr23408.c
@@ -1,4 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } */
+
+int g ();
 static __inline__ int f () { return g (); }
 int g () { return f (); }
diff --git gcc/gcc/testsuite/gcc.dg/pr23470-1.c gcc/gcc/testsuite/gcc.dg/pr23470-1.c
index 2ddf6f2..130a3dd 100644
--- gcc/gcc/testsuite/gcc.dg/pr23470-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr23470-1.c
@@ -2,6 +2,8 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -ffast-math -fdump-tree-original" } */
 
+void link_error (void);
+
 int f(double a, double b)
 {
   if (((a*a) + (b*b))<0)
diff --git gcc/gcc/testsuite/gcc.dg/pr25795-1.c gcc/gcc/testsuite/gcc.dg/pr25795-1.c
index e568b25..88cd88f 100644
--- gcc/gcc/testsuite/gcc.dg/pr25795-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr25795-1.c
@@ -5,6 +5,7 @@ 
 
 extern const char *mystr;       /* normally in a header */
 const char *mystr;
+int
 main()
 {
 }
diff --git gcc/gcc/testsuite/gcc.dg/pr25795.c gcc/gcc/testsuite/gcc.dg/pr25795.c
index decbe54..37ddc0b 100644
--- gcc/gcc/testsuite/gcc.dg/pr25795.c
+++ gcc/gcc/testsuite/gcc.dg/pr25795.c
@@ -5,6 +5,7 @@ 
 
 extern const char *mystr;       /* normally in a header */
 const char *mystr __attribute__ ((externally_visible));
+int
 main()
 {
 }
diff --git gcc/gcc/testsuite/gcc.dg/pr27861-1.c gcc/gcc/testsuite/gcc.dg/pr27861-1.c
index cf269dc..8d6d791 100644
--- gcc/gcc/testsuite/gcc.dg/pr27861-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr27861-1.c
@@ -52,6 +52,8 @@  struct sim_state
   sim_cpu cpu[1];
 };
 typedef address_word instruction_address;
+void trace_result_word1 ();
+int
 do_dror (SIM_DESC sd, instruction_address cia, int MY_INDEX, unsigned64 x,
 	 unsigned64 y)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr28121.c gcc/gcc/testsuite/gcc.dg/pr28121.c
index 5cbf8f8..9e306f5 100644
--- gcc/gcc/testsuite/gcc.dg/pr28121.c
+++ gcc/gcc/testsuite/gcc.dg/pr28121.c
@@ -1,6 +1,9 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
 
+int GetMouseButton ();
+int ParsePos ();
+
 short
 GetCmd ()
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr28243.c gcc/gcc/testsuite/gcc.dg/pr28243.c
index 12447a1..d096399 100644
--- gcc/gcc/testsuite/gcc.dg/pr28243.c
+++ gcc/gcc/testsuite/gcc.dg/pr28243.c
@@ -14,6 +14,8 @@  struct gpsdisplay {
   struct displayfuncs *funcs;
 };
 
+void PSDoArc ();
+
 static void PSMyArc(double cx, double cy, double radx, double rady, double sa,
 		    double ta)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr28574.c gcc/gcc/testsuite/gcc.dg/pr28574.c
index f5ff6c0..b86f7f6 100644
--- gcc/gcc/testsuite/gcc.dg/pr28574.c
+++ gcc/gcc/testsuite/gcc.dg/pr28574.c
@@ -71,4 +71,5 @@  yasm_list_modules(yasm_module_type type,
     }
 }
 
+int
 main() {}
diff --git gcc/gcc/testsuite/gcc.dg/pr28888.c gcc/gcc/testsuite/gcc.dg/pr28888.c
index c65a26a..3bad18b 100644
--- gcc/gcc/testsuite/gcc.dg/pr28888.c
+++ gcc/gcc/testsuite/gcc.dg/pr28888.c
@@ -3,6 +3,8 @@ 
 
 static const unsigned char _c30[] =
   "statistic of allocated integer registers:";
+void Out__LongInt ();
+int
 Allocate__WriteStats (void)
 {
   register int i0, i1, i2, i3, i4, i5;
diff --git gcc/gcc/testsuite/gcc.dg/pr29254.c gcc/gcc/testsuite/gcc.dg/pr29254.c
index 598b6bf..df6ba57 100644
--- gcc/gcc/testsuite/gcc.dg/pr29254.c
+++ gcc/gcc/testsuite/gcc.dg/pr29254.c
@@ -1,20 +1,25 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Werror" } */
 
+int value_compare ();
+
+int
 list_compare (int * list1)
 {
   if (list1)
     value_compare ();
 }
 
-func1 (int * f){}
+int func1 (int * f){}
 
+int
 value_compare (int * a)
 {
     if (a)
         list_compare (a);
 }
 
+int
 func2 (const int * fb)
 {
   func1 ((int *) fb); /* { dg-bogus "discards qualifiers" } */
diff --git gcc/gcc/testsuite/gcc.dg/pr30189.c gcc/gcc/testsuite/gcc.dg/pr30189.c
index 6aa963e..2f332fb 100644
--- gcc/gcc/testsuite/gcc.dg/pr30189.c
+++ gcc/gcc/testsuite/gcc.dg/pr30189.c
@@ -12,7 +12,7 @@  void baz (int i)
 }
 
 void
-bar (i)
+bar (int i)
 {
   baz (i);
 }
diff --git gcc/gcc/testsuite/gcc.dg/pr30260.c gcc/gcc/testsuite/gcc.dg/pr30260.c
index f737317..e04a8be 100644
--- gcc/gcc/testsuite/gcc.dg/pr30260.c
+++ gcc/gcc/testsuite/gcc.dg/pr30260.c
@@ -3,6 +3,8 @@ 
 /* { dg-options "-pedantic -O" } */
 #include <limits.h>
 
+void link_error (void);
+
 enum A {
   A1 = 0, 
   A2 = A1 - 1
diff --git gcc/gcc/testsuite/gcc.dg/pr31529-1.c gcc/gcc/testsuite/gcc.dg/pr31529-1.c
index 7182e8f..24d2cdb 100644
--- gcc/gcc/testsuite/gcc.dg/pr31529-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr31529-1.c
@@ -1,8 +1,9 @@ 
 /* { dg-do link } */
 /* { dg-require-effective-target lto } */
-/* { dg-options "-flto" } */
+/* { dg-options "-flto -fgnu89-inline" } */
 /* { dg-additional-sources "pr31529-2.c" } */
 
+int
 getline ()
 {
 }
diff --git gcc/gcc/testsuite/gcc.dg/pr31529-2.c gcc/gcc/testsuite/gcc.dg/pr31529-2.c
index 40d8ef8..7f8c40f 100644
--- gcc/gcc/testsuite/gcc.dg/pr31529-2.c
+++ gcc/gcc/testsuite/gcc.dg/pr31529-2.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 
 extern __inline
+int
 getline ()
 {
 }
diff --git gcc/gcc/testsuite/gcc.dg/pr32573.c gcc/gcc/testsuite/gcc.dg/pr32573.c
index d6897fb..190f5db 100644
--- gcc/gcc/testsuite/gcc.dg/pr32573.c
+++ gcc/gcc/testsuite/gcc.dg/pr32573.c
@@ -2,6 +2,8 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3" } */
 
+long long bar (void *);
+
 int
 foo (void *x, long long *y)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr33826.c gcc/gcc/testsuite/gcc.dg/pr33826.c
index c091bbc..8d40d75 100644
--- gcc/gcc/testsuite/gcc.dg/pr33826.c
+++ gcc/gcc/testsuite/gcc.dg/pr33826.c
@@ -5,6 +5,10 @@ 
 /* { dg-require-effective-target nonpic } */
 /* { dg-options "-O1 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const" } */
 
+int recurse1 (int);
+int recurse2b (int);
+int norecurse1b (int);
+
 int recurese1 (int i)
 {
   return recurse1 (i+1);
diff --git gcc/gcc/testsuite/gcc.dg/pr33923.c gcc/gcc/testsuite/gcc.dg/pr33923.c
index d71e557..e933762 100644
--- gcc/gcc/testsuite/gcc.dg/pr33923.c
+++ gcc/gcc/testsuite/gcc.dg/pr33923.c
@@ -12,6 +12,7 @@  typedef struct
 }
 ProtocolOperations;
 static const ProtocolOperations *protocol;
+int
 brl_readCommand (void)
 {
   unsigned long int keys;
diff --git gcc/gcc/testsuite/gcc.dg/pr34263.c gcc/gcc/testsuite/gcc.dg/pr34263.c
index d389ead..57b8f8a 100644
--- gcc/gcc/testsuite/gcc.dg/pr34263.c
+++ gcc/gcc/testsuite/gcc.dg/pr34263.c
@@ -14,6 +14,7 @@  int count = 0;
 void sub( struct s *p, struct s **pp );
 int look( struct s *p, struct s **pp );
 
+int
 main()
 {
     struct s *pp;
diff --git gcc/gcc/testsuite/gcc.dg/pr35065.c gcc/gcc/testsuite/gcc.dg/pr35065.c
index e5984ab..8b272f8 100644
--- gcc/gcc/testsuite/gcc.dg/pr35065.c
+++ gcc/gcc/testsuite/gcc.dg/pr35065.c
@@ -97,6 +97,7 @@  static inline uint32_t bs_read1( bs_t *s ) {
   return 0;
 }
 int Open ( vlc_object_t * );
+int vlc_module_set ( module_t *, enum vlc_module_properties, void *);
 void Close( vlc_object_t * );
 __attribute__((visibility("default"))) int vlc_entry__0_9_0f ( module_t *p_module ) {
   {
@@ -128,6 +129,7 @@  struct decoder_sys_t {
 };
 enum { NAL_SLICE = 1, NAL_SLICE_IDR = 5, NAL_SPS = 7, NAL_AU_DELIMITER= 9 };
 static block_t *ParseNALBlock( decoder_t *, block_t * );
+int U16_AT ( uint8_t * );
 int Open( vlc_object_t *p_this ) {
   decoder_t *p_dec = (decoder_t*)p_this;
   decoder_sys_t *p_sys;
diff --git gcc/gcc/testsuite/gcc.dg/pr36194.c gcc/gcc/testsuite/gcc.dg/pr36194.c
index 070a944..ae660e4 100644
--- gcc/gcc/testsuite/gcc.dg/pr36194.c
+++ gcc/gcc/testsuite/gcc.dg/pr36194.c
@@ -22,6 +22,7 @@  g (long long a)
   asm ("");
 }
 
+int
 main ()
 {
   g (0x1234567887654321ll);
diff --git gcc/gcc/testsuite/gcc.dg/pr38616.c gcc/gcc/testsuite/gcc.dg/pr38616.c
index b4534b5..c693eec 100644
--- gcc/gcc/testsuite/gcc.dg/pr38616.c
+++ gcc/gcc/testsuite/gcc.dg/pr38616.c
@@ -5,6 +5,8 @@ 
 
 #include <stdio.h> 
 
+extern int strcmp (const char *, const char *);
+
 #define BUFFER "1234567890abcdefghijklmno"
 int main (void)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr39867.c gcc/gcc/testsuite/gcc.dg/pr39867.c
index cb79724..fbe0924 100644
--- gcc/gcc/testsuite/gcc.dg/pr39867.c
+++ gcc/gcc/testsuite/gcc.dg/pr39867.c
@@ -1,6 +1,8 @@ 
 /* { dg-do link } */
 /* { dg-options "-O2" } */
 
+extern void link_error (void);
+
 int main (void)
 {
   int exp = -1;
diff --git gcc/gcc/testsuite/gcc.dg/pr41470.c gcc/gcc/testsuite/gcc.dg/pr41470.c
index 1c029b4..ddbe66e 100644
--- gcc/gcc/testsuite/gcc.dg/pr41470.c
+++ gcc/gcc/testsuite/gcc.dg/pr41470.c
@@ -1,5 +1,8 @@ 
 /* { dg-do compile } */
 /* { dg-options "-fexceptions" } */
+
+void cf (void *);
+
 void *
 af (void *a)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr41837.c gcc/gcc/testsuite/gcc.dg/pr41837.c
index f96c347..1ff9915 100644
--- gcc/gcc/testsuite/gcc.dg/pr41837.c
+++ gcc/gcc/testsuite/gcc.dg/pr41837.c
@@ -13,6 +13,10 @@  typedef struct { T3 h; } T6;
 typedef struct { int i; } *T7;
 struct S3 { T6 j; T7 k; };
 
+void f5 (T4);
+void f6 (void (*)(T4));
+void f7 (void (*)(T5, T1 *));
+
 void
 f1 (T4 x)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr44024.c gcc/gcc/testsuite/gcc.dg/pr44024.c
index 6234aec..30eb9d1 100644
--- gcc/gcc/testsuite/gcc.dg/pr44024.c
+++ gcc/gcc/testsuite/gcc.dg/pr44024.c
@@ -2,6 +2,7 @@ 
 /* { dg-options "-O1 -fdelete-null-pointer-checks -fdump-tree-ccp1" } */
 
 void foo();
+void link_error (void);
 
 int main()
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr44699.c gcc/gcc/testsuite/gcc.dg/pr44699.c
index 601cc78..bd2b1a8 100644
--- gcc/gcc/testsuite/gcc.dg/pr44699.c
+++ gcc/gcc/testsuite/gcc.dg/pr44699.c
@@ -5,6 +5,7 @@  typedef long int intmax_t;
 typedef long unsigned int uintmax_t;
 extern void *xmalloc (size_t) __attribute__ ((__malloc__));
 extern const char *trim_filename (const char *);
+extern void error (const char *, ...);
 
 static __inline void *
 __inline_memcpy_chk (void *__dest, const void *__src, size_t __len)
diff --git gcc/gcc/testsuite/gcc.dg/pr45415.c gcc/gcc/testsuite/gcc.dg/pr45415.c
index 12d9fc0..9574b3a 100644
--- gcc/gcc/testsuite/gcc.dg/pr45415.c
+++ gcc/gcc/testsuite/gcc.dg/pr45415.c
@@ -53,6 +53,7 @@  df(f_be, t_be)
 
 void abort (void);
 void exit (int);
+int
 main ()
 {
   t_be x;
diff --git gcc/gcc/testsuite/gcc.dg/pr46252.c gcc/gcc/testsuite/gcc.dg/pr46252.c
index 70bf21d..6df4f2c 100644
--- gcc/gcc/testsuite/gcc.dg/pr46252.c
+++ gcc/gcc/testsuite/gcc.dg/pr46252.c
@@ -2,6 +2,8 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O -frerun-cse-after-loop -fno-tree-loop-optimize -funroll-loops -fcompare-debug" } */
 
+void bar (void);
+
 void
 foo (float *f)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr46878-1.c gcc/gcc/testsuite/gcc.dg/pr46878-1.c
index f5b42de..b8722a4 100644
--- gcc/gcc/testsuite/gcc.dg/pr46878-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr46878-1.c
@@ -3,6 +3,9 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
 
+int __foo (void);
+int __bar (void);
+
 struct baz
 {
   int *newp;
diff --git gcc/gcc/testsuite/gcc.dg/pr47443.c gcc/gcc/testsuite/gcc.dg/pr47443.c
index fa7d6b9..47abea2 100644
--- gcc/gcc/testsuite/gcc.dg/pr47443.c
+++ gcc/gcc/testsuite/gcc.dg/pr47443.c
@@ -2,7 +2,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O -fstack-check=generic" } */
 
-static inline bar (char *c, int i)
+static inline int bar (char *c, int i)
 {
   return c + i > c;
 }
diff --git gcc/gcc/testsuite/gcc.dg/pr47763.c gcc/gcc/testsuite/gcc.dg/pr47763.c
index a5da2de..60fad41 100644
--- gcc/gcc/testsuite/gcc.dg/pr47763.c
+++ gcc/gcc/testsuite/gcc.dg/pr47763.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -funroll-loops -fdump-rtl-web" } */
 
+int
 foo()
 {
 }
diff --git gcc/gcc/testsuite/gcc.dg/pr49000.c gcc/gcc/testsuite/gcc.dg/pr49000.c
index 32a1cdb3..996b8f6 100644
--- gcc/gcc/testsuite/gcc.dg/pr49000.c
+++ gcc/gcc/testsuite/gcc.dg/pr49000.c
@@ -2,7 +2,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -g" } */
 
-static
+static int
 foo (int x, int y)
 {
   return x * y;
diff --git gcc/gcc/testsuite/gcc.dg/pr50340.c gcc/gcc/testsuite/gcc.dg/pr50340.c
index 1843036..b608b38 100644
--- gcc/gcc/testsuite/gcc.dg/pr50340.c
+++ gcc/gcc/testsuite/gcc.dg/pr50340.c
@@ -23,7 +23,7 @@  static HARD_REG_SET reload_reg_used_in_op_addr_reload;
 static HARD_REG_SET reload_reg_used_in_insn;
 static HARD_REG_SET reload_reg_used_in_other_addr;
 static HARD_REG_SET reload_reg_used_at_all;
-void __attribute__((cold)) mark_reload_reg_in_use (regno, opnum, type, mode)
+void __attribute__((cold)) mark_reload_reg_in_use (int regno, int opnum, int type, int mode)
 {
   int nregs = regno ? 1 : mode_size[mode];
   int i;
diff --git gcc/gcc/testsuite/gcc.dg/pr50908-3.c gcc/gcc/testsuite/gcc.dg/pr50908-3.c
index 60db03d..9103e6b 100644
--- gcc/gcc/testsuite/gcc.dg/pr50908-3.c
+++ gcc/gcc/testsuite/gcc.dg/pr50908-3.c
@@ -3,6 +3,7 @@ 
 
 extern int v1;
 extern int v2;
+void g (void);
 
 void
 f ()
diff --git gcc/gcc/testsuite/gcc.dg/pr50908.c gcc/gcc/testsuite/gcc.dg/pr50908.c
index 75341f8..114dded 100644
--- gcc/gcc/testsuite/gcc.dg/pr50908.c
+++ gcc/gcc/testsuite/gcc.dg/pr50908.c
@@ -57,9 +57,13 @@  struct window
 };
 extern Lisp_Object Vtruncate_partial_width_windows;
 extern struct Lisp_Char_Table *window_display_table (struct window *);
+long find_before_next_newline (long, long, long);
+long disp_char_vector (struct Lisp_Char_Table *, int);
+long char_table_ref (Lisp_Object, int); 
 struct position *
 compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos,
 		width, hscroll, tab_offset, win)
+     int did_motion, width, hscroll, tab_offset;
      long from, fromvpos, fromhpos, to, tovpos, tohpos;
      struct window *win;
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr51796.c gcc/gcc/testsuite/gcc.dg/pr51796.c
index c07ad10..64a6095 100644
--- gcc/gcc/testsuite/gcc.dg/pr51796.c
+++ gcc/gcc/testsuite/gcc.dg/pr51796.c
@@ -2,6 +2,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-Os -fno-omit-frame-pointer -fno-tree-dominator-opts -fno-tree-fre -fno-tree-pre" } */
 
+void stop (void);
 typedef void (*entry_func) (void) __attribute__ ((noreturn));
 extern entry_func entry_addr;
 static void bsd_boot_entry (void)
diff --git gcc/gcc/testsuite/gcc.dg/pr52808.c gcc/gcc/testsuite/gcc.dg/pr52808.c
index b731cb4..8a33d08 100644
--- gcc/gcc/testsuite/gcc.dg/pr52808.c
+++ gcc/gcc/testsuite/gcc.dg/pr52808.c
@@ -8,5 +8,5 @@  int main ()
   i = 0;
   for (;; i++)
     if (*fn1 ()[i] && !'a' <= 0 && i <= 'z' || *fn1 ()[0] && 'a' <= 'z')
-      return;
+      return 0;
 }
diff --git gcc/gcc/testsuite/gcc.dg/pr55150-2.c gcc/gcc/testsuite/gcc.dg/pr55150-2.c
index 1be769d..ed571d6 100644
--- gcc/gcc/testsuite/gcc.dg/pr55150-2.c
+++ gcc/gcc/testsuite/gcc.dg/pr55150-2.c
@@ -7,6 +7,7 @@  typedef unsigned char DES_cblock[8];
  typedef struct DES_ks {
  }
  DES_key_schedule;
+void DES_encrypt1 (long *, DES_key_schedule *, int);
  void DES_ede3_cbcm_encrypt (const unsigned char *in, unsigned char *out, 		       long length, DES_key_schedule * ks1, 		       DES_key_schedule * ks2, DES_key_schedule * ks3, 		       DES_cblock * ivec1, DES_cblock * ivec2, int enc) {
    register unsigned long tout0, tout1, xor0, xor1, m0, m1;
    register long l = length;
diff --git gcc/gcc/testsuite/gcc.dg/pr55833.c gcc/gcc/testsuite/gcc.dg/pr55833.c
index 7a5c549..b35104b 100644
--- gcc/gcc/testsuite/gcc.dg/pr55833.c
+++ gcc/gcc/testsuite/gcc.dg/pr55833.c
@@ -3,6 +3,7 @@ 
 /* { dg-options "-O3" } */
 
 int a, b, c;
+int bar (void);
 
 void foo()
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr59350.c gcc/gcc/testsuite/gcc.dg/pr59350.c
index fa63245..3d38486 100644
--- gcc/gcc/testsuite/gcc.dg/pr59350.c
+++ gcc/gcc/testsuite/gcc.dg/pr59350.c
@@ -60,6 +60,10 @@  typedef enum
     0x09, kDNSFlag1_RC_NotZone = 0x0A
 }
 TSIG_ErrorCode;
+int uDNS_ReceiveTestQuestionResponse (mDNS * const, DNSMessage * const,
+				      const char * const,
+				      const mDNSAddr * const,
+				      const mDNSIPPort);
 void
 uDNS_ReceiveMsg (mDNS * const m, DNSMessage * const msg,
 		 const char * const end, const mDNSAddr * const srcaddr,
diff --git gcc/gcc/testsuite/gcc.dg/pr59418.c gcc/gcc/testsuite/gcc.dg/pr59418.c
index 257ce79..12999aa 100644
--- gcc/gcc/testsuite/gcc.dg/pr59418.c
+++ gcc/gcc/testsuite/gcc.dg/pr59418.c
@@ -6,6 +6,7 @@ 
 /* { dg-options "-march=armv7-a -mfloat-abi=hard -Os -g" { target { arm*-*-* && { ! arm_thumb1 } } } } */
 
 extern int printf (const char *__format, ...);
+double bar (const char *, int);
 
 void
 foo (const char *pptr, int caplen)
diff --git gcc/gcc/testsuite/gcc.dg/pr59940.c gcc/gcc/testsuite/gcc.dg/pr59940.c
index d81eaf7..6dba8c7 100644
--- gcc/gcc/testsuite/gcc.dg/pr59940.c
+++ gcc/gcc/testsuite/gcc.dg/pr59940.c
@@ -3,7 +3,7 @@ 
 /* { dg-options "-Wconversion -Woverflow" } */
 
 int f (unsigned int);
-typedef sitype __attribute__((mode(SI)));
+typedef int sitype __attribute__((mode(SI)));
 
 int
 g (void)
diff --git gcc/gcc/testsuite/gcc.dg/pr60139.c gcc/gcc/testsuite/gcc.dg/pr60139.c
index a63d8b5..96e42ed 100644
--- gcc/gcc/testsuite/gcc.dg/pr60139.c
+++ gcc/gcc/testsuite/gcc.dg/pr60139.c
@@ -1,6 +1,6 @@ 
 /* PR c/60139 */
 /* { dg-do compile } */
-/* { dg-options "-Wpedantic" } */
+/* { dg-options "-Wpedantic -std=gnu89" } */
 /* { dg-prune-output ".*near initialization for.*" } */
 
 double sin (double);
diff --git gcc/gcc/testsuite/gcc.dg/pr60647-1.c gcc/gcc/testsuite/gcc.dg/pr60647-1.c
index 73ea856..99f5919 100644
--- gcc/gcc/testsuite/gcc.dg/pr60647-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr60647-1.c
@@ -7,19 +7,23 @@  struct _wincore
   int width;
 };
 int a;
-static fn1 (dpy, winInfo) struct _XDisplay *dpy;
+void fn2 (void);
+static int fn1 (dpy, winInfo) struct _XDisplay *dpy;
 struct _wincore *winInfo;
 {
   a = winInfo->width;
   fn2 ();
 }
 
-static fn3 (dpy, winInfo, visrgn) struct _XDisplay *dpy;
+void fn4 (int, int, int);
+static int fn3 (dpy, winInfo, visrgn) struct _XDisplay *dpy;
+int winInfo, visrgn;
 {
   int b = fn1 (0, winInfo);
   fn4 (0, 0, visrgn);
 }
 
+int
 fn5 (event) struct _XEvent *event;
 {
   fn3 (0, 0, 0);
diff --git gcc/gcc/testsuite/gcc.dg/pr60647-2.c gcc/gcc/testsuite/gcc.dg/pr60647-2.c
index ddeb117..60655bf 100644
--- gcc/gcc/testsuite/gcc.dg/pr60647-2.c
+++ gcc/gcc/testsuite/gcc.dg/pr60647-2.c
@@ -6,6 +6,9 @@  struct _wincore
   int width, height;
 };
 
+void fn1 (int);
+void fn2 (int, int, int *);
+
 static void
 foo (void *dpy, struct _wincore *winInfo, int offset)
 {
diff --git gcc/gcc/testsuite/gcc.dg/pr63186.c gcc/gcc/testsuite/gcc.dg/pr63186.c
index b364875..8efb750 100644
--- gcc/gcc/testsuite/gcc.dg/pr63186.c
+++ gcc/gcc/testsuite/gcc.dg/pr63186.c
@@ -25,6 +25,8 @@  foo ()
 {
   bar ();
 }
+
+int
 main()
 {
 }
diff --git gcc/gcc/testsuite/gcc.dg/pragma-diag-1.c gcc/gcc/testsuite/gcc.dg/pragma-diag-1.c
index b6d294d..d0bb0d6 100644
--- gcc/gcc/testsuite/gcc.dg/pragma-diag-1.c
+++ gcc/gcc/testsuite/gcc.dg/pragma-diag-1.c
@@ -2,6 +2,9 @@ 
 /* { dg-options "-Wuninitialized -O2" } */
 /* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
 
+void foo (int);
+
+int
 main()
 {
   int a;
diff --git gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int.c gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int.c
index d03e831..a40c3dd 100644
--- gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int.c
+++ gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int.c
@@ -108,6 +108,7 @@  void simulate_thread_main()
     }
 }
 
+int
 main()
 {
   simulate_thread_main ();
diff --git gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int128.c gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int128.c
index 651e76a..759a83d 100644
--- gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int128.c
+++ gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int128.c
@@ -120,6 +120,7 @@  void simulate_thread_main()
     }
 }
 
+int
 main()
 {
   fill_table ();
diff --git gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-longlong.c gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-longlong.c
index 91f9a06..524b984 100644
--- gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-longlong.c
+++ gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-longlong.c
@@ -110,6 +110,7 @@  void simulate_thread_main()
     }
 }
 
+int
 main()
 {
   simulate_thread_main ();
diff --git gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-short.c gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-short.c
index e7b54c4..62690ce 100644
--- gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-short.c
+++ gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-short.c
@@ -108,6 +108,7 @@  void simulate_thread_main()
     }
 }
 
+int
 main()
 {
   simulate_thread_main ();
diff --git gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-int.c gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-int.c
index 990310c..89871c0 100644
--- gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-int.c
+++ gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-int.c
@@ -110,6 +110,7 @@  void simulate_thread_main()
     test_abort ();
 }
 
+int
 main ()
 {
   simulate_thread_main ();
diff --git gcc/gcc/testsuite/gcc.dg/sms-1.c gcc/gcc/testsuite/gcc.dg/sms-1.c
index 26e502e..3713dc6 100644
--- gcc/gcc/testsuite/gcc.dg/sms-1.c
+++ gcc/gcc/testsuite/gcc.dg/sms-1.c
@@ -11,7 +11,7 @@  void * a[255];
 
 __attribute__ ((noinline))
 void
-f (m)
+f (int m)
 {
   int i;
   int sh = 0x100;
diff --git gcc/gcc/testsuite/gcc.dg/uninit-suppress.c gcc/gcc/testsuite/gcc.dg/uninit-suppress.c
index be3b4c1..53e6bcf 100644
--- gcc/gcc/testsuite/gcc.dg/uninit-suppress.c
+++ gcc/gcc/testsuite/gcc.dg/uninit-suppress.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-fno-tree-ccp -fno-tree-vrp -O2 -Wuninitialized -Wno-maybe-uninitialized" } */
 void blah();
+void bar (int);
 int gflag;
 
 void foo()
diff --git gcc/gcc/testsuite/gcc.dg/uninit-suppress_2.c gcc/gcc/testsuite/gcc.dg/uninit-suppress_2.c
index e149734..a4371ec 100644
--- gcc/gcc/testsuite/gcc.dg/uninit-suppress_2.c
+++ gcc/gcc/testsuite/gcc.dg/uninit-suppress_2.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-fno-tree-ccp -fno-tree-vrp -O2 -Wuninitialized -Werror=uninitialized -Wno-error=maybe-uninitialized" } */
 void blah();
+void bar (int);
 int gflag;
 
 void foo()
diff --git gcc/gcc/testsuite/gcc.dg/unused-3.c gcc/gcc/testsuite/gcc.dg/unused-3.c
index 1205624..cd64abd 100644
--- gcc/gcc/testsuite/gcc.dg/unused-3.c
+++ gcc/gcc/testsuite/gcc.dg/unused-3.c
@@ -5,6 +5,7 @@ 
 /* { dg-options "-Wunused" } */
 
 typedef short unused_type __attribute__ ((unused));
+int
 main ()
 {
   short
diff --git gcc/gcc/testsuite/gcc.dg/utf-dflt.c gcc/gcc/testsuite/gcc.dg/utf-dflt.c
index f672f0a..fc830d8 100644
--- gcc/gcc/testsuite/gcc.dg/utf-dflt.c
+++ gcc/gcc/testsuite/gcc.dg/utf-dflt.c
@@ -1,7 +1,7 @@ 
 /* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
 /* If not gnu99, the u and U prefixes should be parsed as separate tokens. */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu89" } */
 
 const unsigned short	c0	= u'a';		/* { dg-error "undeclared" "undeclared" } */
 		/* { dg-error "expected ',' or ';'" "expected" { target *-*-* } 6 } */
diff --git gcc/gcc/testsuite/gcc.dg/utf-dflt2.c gcc/gcc/testsuite/gcc.dg/utf-dflt2.c
index 022c081..bf2210c 100644
--- gcc/gcc/testsuite/gcc.dg/utf-dflt2.c
+++ gcc/gcc/testsuite/gcc.dg/utf-dflt2.c
@@ -1,6 +1,6 @@ 
 /* If not gnu99, the u8 prefix should be parsed as separate tokens. */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu89" } */
 
 const void	*s0 = u8"a";		/* { dg-error "undeclared" "undeclared" } */
 		/* { dg-error "expected ',' or ';'" "expected" { target *-*-* } 5 } */
diff --git gcc/gcc/testsuite/gcc.dg/va-arg-pack-1.c gcc/gcc/testsuite/gcc.dg/va-arg-pack-1.c
index 09ae979..888f3d7 100644
--- gcc/gcc/testsuite/gcc.dg/va-arg-pack-1.c
+++ gcc/gcc/testsuite/gcc.dg/va-arg-pack-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fgnu89-inline" } */
 
 int bar (int, const char *, int, ...);
 int baz (int, const char *, long int);
diff --git gcc/gcc/testsuite/gcc.dg/varpool-1.c gcc/gcc/testsuite/gcc.dg/varpool-1.c
index 48f1cd3..cb7aebd 100644
--- gcc/gcc/testsuite/gcc.dg/varpool-1.c
+++ gcc/gcc/testsuite/gcc.dg/varpool-1.c
@@ -5,7 +5,7 @@ 
 static int unnecesary_static_initialized_variable;
 static int *unnecesary_static_initialized_variable2 =
   &unnecesary_static_initialized_variable;
-static inline
+static inline int
 simplify_after_inline (int param1, int *param2)
 {
   if (unnecesary_static_initialized_variable != param1)
@@ -14,6 +14,7 @@  simplify_after_inline (int param1, int *param2)
     return unnecesary_static_initialized_variable;
 }
 
+int
 main ()
 {
   return simplify_after_inline (unnecesary_static_initialized_variable,
diff --git gcc/gcc/testsuite/gcc.dg/webizer.c gcc/gcc/testsuite/gcc.dg/webizer.c
index 4f03037..982fbca 100644
--- gcc/gcc/testsuite/gcc.dg/webizer.c
+++ gcc/gcc/testsuite/gcc.dg/webizer.c
@@ -18,6 +18,7 @@  int block = 0;
 double ckt_size_factor ;
 
 __attribute__ ((noinline))
+int
 configure2()
 {
   block = 0 ;
@@ -29,6 +30,7 @@  configure2()
   }
 }
 
+int
 main()
 {
   configure2();
diff --git gcc/gcc/testsuite/gcc.dg/winline-2.c gcc/gcc/testsuite/gcc.dg/winline-2.c
index 584c68f..f47c38c 100644
--- gcc/gcc/testsuite/gcc.dg/winline-2.c
+++ gcc/gcc/testsuite/gcc.dg/winline-2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-Winline -O2" } */
+/* { dg-options "-Winline -O2 -fgnu89-inline" } */
 
 inline int q(void);		 /* { dg-warning "body not available" "" } */
 inline int t(void)
diff --git gcc/gcc/testsuite/gcc.dg/winline-3.c gcc/gcc/testsuite/gcc.dg/winline-3.c
index fc12f57..0540a24 100644
--- gcc/gcc/testsuite/gcc.dg/winline-3.c
+++ gcc/gcc/testsuite/gcc.dg/winline-3.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-Winline -O2 --param max-inline-insns-single=1 --param inline-min-speedup=100" } */
+/* { dg-options "-Winline -O2 --param max-inline-insns-single=1 --param inline-min-speedup=100 -fgnu89-inline" } */
 
 void big (void);
 inline int q(void) /* { dg-warning "max-inline-insns-single" "" } */
diff --git gcc/gcc/testsuite/gcc.dg/winline-5.c gcc/gcc/testsuite/gcc.dg/winline-5.c
index a42ae94..da4be45 100644
--- gcc/gcc/testsuite/gcc.dg/winline-5.c
+++ gcc/gcc/testsuite/gcc.dg/winline-5.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-Winline -O2 --param inline-unit-growth=0 --param large-unit-insns=0" } */
+/* { dg-options "-Winline -O2 --param inline-unit-growth=0 --param large-unit-insns=0 -fgnu89-inline" } */
 
 void big (void);
 inline int q(void) /* { dg-warning "inline-unit-growth" } */
diff --git gcc/gcc/testsuite/gcc.dg/winline-6.c gcc/gcc/testsuite/gcc.dg/winline-6.c
index 4e22ce1..35e3aac 100644
--- gcc/gcc/testsuite/gcc.dg/winline-6.c
+++ gcc/gcc/testsuite/gcc.dg/winline-6.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-Winline -O2 --param large-function-growth=0 --param large-function-insns=1" } */
+/* { dg-options "-Winline -O2 --param large-function-growth=0 --param large-function-insns=1 -fgnu89-inline" } */
 
 void big (void);
 inline int q(void) /* { dg-warning "large-function-growth" } */
diff --git gcc/gcc/testsuite/gcc.dg/winline-7.c gcc/gcc/testsuite/gcc.dg/winline-7.c
index 19262da..33ad74b 100644
--- gcc/gcc/testsuite/gcc.dg/winline-7.c
+++ gcc/gcc/testsuite/gcc.dg/winline-7.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-Winline -O2" } */
+/* { dg-options "-Winline -O2 -fgnu89-inline" } */
 
 extern void *alloca (__SIZE_TYPE__);
 
diff --git gcc/gcc/testsuite/gcc.dg/winline-9.c gcc/gcc/testsuite/gcc.dg/winline-9.c
index fddf5c6..c8b18c9 100644
--- gcc/gcc/testsuite/gcc.dg/winline-9.c
+++ gcc/gcc/testsuite/gcc.dg/winline-9.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -Winline --param large-stack-frame=10 --param large-stack-frame-growth=2" } */
+/* { dg-options "-O2 -Winline --param large-stack-frame=10 --param large-stack-frame-growth=2 -fgnu89-inline" } */
 
 int a,b;
 void test(char *);
@@ -16,6 +16,7 @@  int bb (void) /* { dg-warning "large-stack-frame" "" } */
   test(t);
 }
 
+int
 t()
 {
   if (a)
diff --git gcc/gcc/testsuite/gcc.dg/wtr-func-def-1.c gcc/gcc/testsuite/gcc.dg/wtr-func-def-1.c
index 049e05b..bc5a91b 100644
--- gcc/gcc/testsuite/gcc.dg/wtr-func-def-1.c
+++ gcc/gcc/testsuite/gcc.dg/wtr-func-def-1.c
@@ -2,7 +2,7 @@ 
    Note, gcc should omit these warnings in system header files.
    Origin: Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6/30/2002.  */
 /* { dg-do compile } */
-/* { dg-options "-Wtraditional" } */
+/* { dg-options "-Wtraditional -std=gnu89" } */
 
 /* Test some simple cases.  */
 
diff --git gcc/gcc/testsuite/gcc.dg/bitfld-9.c gcc/gcc/testsuite/gcc.dg/bitfld-9.c
index d6ae0ac..c580e15 100644
--- gcc/gcc/testsuite/gcc.dg/bitfld-9.c
+++ gcc/gcc/testsuite/gcc.dg/bitfld-9.c
@@ -1,7 +1,7 @@ 
 /* Test -funsigned-bitfields works.  */
 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
 /* { dg-do run } */
-/* { dg-options "-funsigned-bitfields -fsigned-char" } */
+/* { dg-options "-funsigned-bitfields -fsigned-char -std=gnu89" } */
 
 typedef char c;
 typedef signed char sc;
diff --git gcc/gcc/testsuite/gcc.dg/decl-nospec-1.c gcc/gcc/testsuite/gcc.dg/decl-nospec-1.c
index 5767c3b..b7061c4 100644
--- gcc/gcc/testsuite/gcc.dg/decl-nospec-1.c
+++ gcc/gcc/testsuite/gcc.dg/decl-nospec-1.c
@@ -3,6 +3,6 @@ 
    -pedantic.  Test with no options.  */
 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu89" } */
 
 foo(); /* { dg-warning "data definition has no type or storage class" } */
diff --git gcc/gcc/testsuite/gcc.dg/decl-nospec-2.c gcc/gcc/testsuite/gcc.dg/decl-nospec-2.c
index ab62894..a4e9052 100644
--- gcc/gcc/testsuite/gcc.dg/decl-nospec-2.c
+++ gcc/gcc/testsuite/gcc.dg/decl-nospec-2.c
@@ -3,6 +3,6 @@ 
    -pedantic.  Test with -pedantic.  */
 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
 /* { dg-do compile } */
-/* { dg-options "-pedantic" } */
+/* { dg-options "-std=gnu89 -pedantic" } */
 
 foo(); /* { dg-warning "data definition has no type or storage class" } */
diff --git gcc/gcc/testsuite/gcc.dg/decl-nospec-3.c gcc/gcc/testsuite/gcc.dg/decl-nospec-3.c
index 8fb03ea..f0347ca 100644
--- gcc/gcc/testsuite/gcc.dg/decl-nospec-3.c
+++ gcc/gcc/testsuite/gcc.dg/decl-nospec-3.c
@@ -3,6 +3,6 @@ 
    -pedantic.  Test with -pedantic-errors.  */
 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
 /* { dg-do compile } */
-/* { dg-options "-pedantic-errors" } */
+/* { dg-options "-std=gnu89 -pedantic-errors" } */
 
 foo(); /* { dg-error "data definition has no type or storage class" } */
diff --git gcc/gcc/testsuite/gcc.dg/declspec-5.c gcc/gcc/testsuite/gcc.dg/declspec-5.c
index e44412e..52b2433 100644
--- gcc/gcc/testsuite/gcc.dg/declspec-5.c
+++ gcc/gcc/testsuite/gcc.dg/declspec-5.c
@@ -2,7 +2,7 @@ 
    -pedantic.  */
 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
 /* { dg-do compile } */
-/* { dg-options "-pedantic" } */
+/* { dg-options "-std=gnu89 -pedantic" } */
 
 /* If a declaration does not declare a declarator, it must declare a
    tag or the members of an enumeration, and must only contain one
diff --git gcc/gcc/testsuite/gcc.dg/declspec-6.c gcc/gcc/testsuite/gcc.dg/declspec-6.c
index a20aa94..40b77be 100644
--- gcc/gcc/testsuite/gcc.dg/declspec-6.c
+++ gcc/gcc/testsuite/gcc.dg/declspec-6.c
@@ -2,7 +2,7 @@ 
    -pedantic-errors.  */
 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
 /* { dg-do compile } */
-/* { dg-options "-pedantic-errors" } */
+/* { dg-options "-std=gnu89 -pedantic-errors" } */
 
 /* If a declaration does not declare a declarator, it must declare a
    tag or the members of an enumeration, and must only contain one
diff --git gcc/gcc/testsuite/gcc.dg/ftrapv-2.c gcc/gcc/testsuite/gcc.dg/ftrapv-2.c
index 7d76574..721bece 100644
--- gcc/gcc/testsuite/gcc.dg/ftrapv-2.c
+++ gcc/gcc/testsuite/gcc.dg/ftrapv-2.c
@@ -11,6 +11,7 @@ 
 /* { dg-require-effective-target trapping } */
 
 extern void abort(void);
+extern int abs(int);
 extern long labs(long);
 
 int __attribute__((noinline))
diff --git gcc/gcc/testsuite/gcc.dg/pr35899.c gcc/gcc/testsuite/gcc.dg/pr35899.c
index fca3a3d..7bfb53f 100644
--- gcc/gcc/testsuite/gcc.dg/pr35899.c
+++ gcc/gcc/testsuite/gcc.dg/pr35899.c
@@ -1,6 +1,6 @@ 
 /* PR tree-optimization/35899 */
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu89 -O2" } */
 
 int
 foo (void)
diff --git gcc/gcc/testsuite/gcc.dg/pr59963-1.c gcc/gcc/testsuite/gcc.dg/pr59963-1.c
index 4a369db..dbb347f 100644
--- gcc/gcc/testsuite/gcc.dg/pr59963-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr59963-1.c
@@ -1,6 +1,6 @@ 
 /* PR c/59963 */
 /* { dg-do compile } */
-/* { dg-options "-Wdouble-promotion" } */
+/* { dg-options "-std=gnu89 -Wdouble-promotion" } */
 
 extern void baz ();
 extern void qux (int, ...);
diff --git gcc/gcc/testsuite/gcc.dg/redecl-15.c gcc/gcc/testsuite/gcc.dg/redecl-15.c
index d2f48bd..ff484c9 100644
--- gcc/gcc/testsuite/gcc.dg/redecl-15.c
+++ gcc/gcc/testsuite/gcc.dg/redecl-15.c
@@ -2,7 +2,7 @@ 
    despite incompatible type.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu89" } */
 
 void
 f (void)