From: Marek Polacek Date: Mon, 6 Oct 2014 11:46:21 +0000 (+0000) Subject: 20001012-1.c: Fix defaulting to int. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ece1ab347d8132732173a001a2bb8df1770de14;p=gcc.git 20001012-1.c: Fix defaulting to int. * 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. From-SVN: r215925 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 586df821e3f..878d44d2153 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,152 @@ +2014-10-06 Marek Polacek + + * 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. + 2014-10-06 Marek Polacek * gcc.dg/ipa/inline-2.c: Fix implicit declarations. diff --git a/gcc/testsuite/gcc.dg/20001012-1.c b/gcc/testsuite/gcc.dg/20001012-1.c index eda69c0296f..c59169b2749 100644 --- a/gcc/testsuite/gcc.dg/20001012-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20001012-2.c b/gcc/testsuite/gcc.dg/20001012-2.c index 32dc27c59fa..629ae1b3773 100644 --- a/gcc/testsuite/gcc.dg/20001012-2.c +++ b/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 a/gcc/testsuite/gcc.dg/20001108-1.c b/gcc/testsuite/gcc.dg/20001108-1.c index 682257fdb09..1fc3e98e1d8 100644 --- a/gcc/testsuite/gcc.dg/20001108-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20010516-1.c b/gcc/testsuite/gcc.dg/20010516-1.c index 6ddabd0931d..fbafe98e49d 100644 --- a/gcc/testsuite/gcc.dg/20010516-1.c +++ b/gcc/testsuite/gcc.dg/20010516-1.c @@ -1,5 +1,6 @@ /* { dg-options "-fshow-column" } */ +void foo() { char d; diff --git a/gcc/testsuite/gcc.dg/20011008-2.c b/gcc/testsuite/gcc.dg/20011008-2.c index 01ff172b4ff..0ea0229ba54 100644 --- a/gcc/testsuite/gcc.dg/20011008-2.c +++ b/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 a/gcc/testsuite/gcc.dg/20020430-1.c b/gcc/testsuite/gcc.dg/20020430-1.c index 8fcdfba0f33..63915a24b17 100644 --- a/gcc/testsuite/gcc.dg/20020430-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20030612-1.c b/gcc/testsuite/gcc.dg/20030612-1.c index f0875124385..00db20a22b0 100644 --- a/gcc/testsuite/gcc.dg/20030612-1.c +++ b/gcc/testsuite/gcc.dg/20030612-1.c @@ -14,6 +14,7 @@ void foo() }); } +int main() { B = 5; diff --git a/gcc/testsuite/gcc.dg/20030702-1.c b/gcc/testsuite/gcc.dg/20030702-1.c index b530c69a452..1516a5a471d 100644 --- a/gcc/testsuite/gcc.dg/20030702-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20030805-1.c b/gcc/testsuite/gcc.dg/20030805-1.c index 6297c5d83ea..286b922ea00 100644 --- a/gcc/testsuite/gcc.dg/20030805-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20040127-2.c b/gcc/testsuite/gcc.dg/20040127-2.c index 6e56dd8fc10..ec762260787 100644 --- a/gcc/testsuite/gcc.dg/20040127-2.c +++ b/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 a/gcc/testsuite/gcc.dg/20040219-1.c b/gcc/testsuite/gcc.dg/20040219-1.c index 1a277d6960b..1c9254a9801 100644 --- a/gcc/testsuite/gcc.dg/20040219-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20041122-1.c b/gcc/testsuite/gcc.dg/20041122-1.c index 2d9faccba43..b2120f81545 100644 --- a/gcc/testsuite/gcc.dg/20041122-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20041213-1.c b/gcc/testsuite/gcc.dg/20041213-1.c index aeff7443ce2..490b6bc187e 100644 --- a/gcc/testsuite/gcc.dg/20041213-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20050309-1.c b/gcc/testsuite/gcc.dg/20050309-1.c index 8e11bc5c072..46b27f82e29 100644 --- a/gcc/testsuite/gcc.dg/20050309-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20050603-2.c b/gcc/testsuite/gcc.dg/20050603-2.c index 363e3cdf35c..8c8e58e1b4d 100644 --- a/gcc/testsuite/gcc.dg/20050603-2.c +++ b/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 a/gcc/testsuite/gcc.dg/20061026.c b/gcc/testsuite/gcc.dg/20061026.c index fb3de2375e5..741ea2eb3b8 100644 --- a/gcc/testsuite/gcc.dg/20061026.c +++ b/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 a/gcc/testsuite/gcc.dg/20070507-1.c b/gcc/testsuite/gcc.dg/20070507-1.c index 2884d1aa8d8..684002f6f91 100644 --- a/gcc/testsuite/gcc.dg/20070507-1.c +++ b/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 a/gcc/testsuite/gcc.dg/20080820.c b/gcc/testsuite/gcc.dg/20080820.c index 002edb1ddf9..badab9a7979 100644 --- a/gcc/testsuite/gcc.dg/20080820.c +++ b/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 a/gcc/testsuite/gcc.dg/20101010-1.c b/gcc/testsuite/gcc.dg/20101010-1.c index 8d74bbf5a1d..cd8fddf62d2 100644 --- a/gcc/testsuite/gcc.dg/20101010-1.c +++ b/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 a/gcc/testsuite/gcc.dg/920413-1.c b/gcc/testsuite/gcc.dg/920413-1.c index 6e8fff7eb0b..c2699fe33b1 100644 --- a/gcc/testsuite/gcc.dg/920413-1.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-1.c b/gcc/testsuite/gcc.dg/Werror-1.c index 001af24525c..88553e7a158 100644 --- a/gcc/testsuite/gcc.dg/Werror-1.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-10.c b/gcc/testsuite/gcc.dg/Werror-10.c index dced20cf02c..c5b2b4bfc6a 100644 --- a/gcc/testsuite/gcc.dg/Werror-10.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-11.c b/gcc/testsuite/gcc.dg/Werror-11.c index 3fb892ee6f2..6e44219f6e4 100644 --- a/gcc/testsuite/gcc.dg/Werror-11.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-12.c b/gcc/testsuite/gcc.dg/Werror-12.c index 4f0bd17623b..a87bf6977ad 100644 --- a/gcc/testsuite/gcc.dg/Werror-12.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-2.c b/gcc/testsuite/gcc.dg/Werror-2.c index 65f285edd01..32a7b331ae6 100644 --- a/gcc/testsuite/gcc.dg/Werror-2.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-3.c b/gcc/testsuite/gcc.dg/Werror-3.c index 97874075db2..76e0680cb59 100644 --- a/gcc/testsuite/gcc.dg/Werror-3.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-4.c b/gcc/testsuite/gcc.dg/Werror-4.c index 73687bef139..85505230b6c 100644 --- a/gcc/testsuite/gcc.dg/Werror-4.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-5.c b/gcc/testsuite/gcc.dg/Werror-5.c index c03fc3b5109..8e901936698 100644 --- a/gcc/testsuite/gcc.dg/Werror-5.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-6.c b/gcc/testsuite/gcc.dg/Werror-6.c index a99c13b08e0..0818ae32917 100644 --- a/gcc/testsuite/gcc.dg/Werror-6.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-7.c b/gcc/testsuite/gcc.dg/Werror-7.c index bafb5c92476..ce28cdc78b6 100644 --- a/gcc/testsuite/gcc.dg/Werror-7.c +++ b/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 a/gcc/testsuite/gcc.dg/Werror-8.c b/gcc/testsuite/gcc.dg/Werror-8.c index 23079ce9de9..9698593a2fe 100644 --- a/gcc/testsuite/gcc.dg/Werror-8.c +++ b/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 a/gcc/testsuite/gcc.dg/Wmissing-parameter-type-no.c b/gcc/testsuite/gcc.dg/Wmissing-parameter-type-no.c index 1031e57a0c8..45e5e42c0da 100644 --- a/gcc/testsuite/gcc.dg/Wmissing-parameter-type-no.c +++ b/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 a/gcc/testsuite/gcc.dg/Wold-style-definition-1.c b/gcc/testsuite/gcc.dg/Wold-style-definition-1.c index aa016338b5e..01d3ffbea75 100644 --- a/gcc/testsuite/gcc.dg/Wold-style-definition-1.c +++ b/gcc/testsuite/gcc.dg/Wold-style-definition-1.c @@ -2,7 +2,7 @@ /* Origin: Andreas Jaeger */ /* { 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 a/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c b/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c index 207162d0e8e..ae2db93c612 100644 --- a/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c +++ b/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 a/gcc/testsuite/gcc.dg/always_inline.c b/gcc/testsuite/gcc.dg/always_inline.c index 482a0a2b46c..8603bc6e38a 100644 --- a/gcc/testsuite/gcc.dg/always_inline.c +++ b/gcc/testsuite/gcc.dg/always_inline.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -fgnu89-inline" } */ #include inline __attribute__ ((always_inline)) void e(int t, ...) /* { dg-error "variable argument lists" } */ diff --git a/gcc/testsuite/gcc.dg/always_inline2.c b/gcc/testsuite/gcc.dg/always_inline2.c index 4f1634e1348..297159b6d66 100644 --- a/gcc/testsuite/gcc.dg/always_inline2.c +++ b/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 a/gcc/testsuite/gcc.dg/always_inline3.c b/gcc/testsuite/gcc.dg/always_inline3.c index 80ea314741b..5d55e4d7e18 100644 --- a/gcc/testsuite/gcc.dg/always_inline3.c +++ b/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 a/gcc/testsuite/gcc.dg/attr-alias-3.c b/gcc/testsuite/gcc.dg/attr-alias-3.c index 6ff1b475ad9..4c6f390c790 100644 --- a/gcc/testsuite/gcc.dg/attr-alias-3.c +++ b/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 a/gcc/testsuite/gcc.dg/bitfld-1.c b/gcc/testsuite/gcc.dg/bitfld-1.c index fa835f2299f..2493670e21b 100644 --- a/gcc/testsuite/gcc.dg/bitfld-1.c +++ b/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 a/gcc/testsuite/gcc.dg/bitfld-9.c b/gcc/testsuite/gcc.dg/bitfld-9.c index d6ae0ac31e8..c580e15ac50 100644 --- a/gcc/testsuite/gcc.dg/bitfld-9.c +++ b/gcc/testsuite/gcc.dg/bitfld-9.c @@ -1,7 +1,7 @@ /* Test -funsigned-bitfields works. */ /* Origin: Joseph Myers */ /* { 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 a/gcc/testsuite/gcc.dg/builtin-apply4.c b/gcc/testsuite/gcc.dg/builtin-apply4.c index 530da711581..c2cedfb8a6f 100644 --- a/gcc/testsuite/gcc.dg/builtin-apply4.c +++ b/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 a/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c b/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c index c5f91d9f21c..9ecfa31dc14 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/macroargs.c +++ b/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 a/gcc/testsuite/gcc.dg/decl-nospec-1.c b/gcc/testsuite/gcc.dg/decl-nospec-1.c index 5767c3b0849..b7061c49f1e 100644 --- a/gcc/testsuite/gcc.dg/decl-nospec-1.c +++ b/gcc/testsuite/gcc.dg/decl-nospec-1.c @@ -3,6 +3,6 @@ -pedantic. Test with no options. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu89" } */ foo(); /* { dg-warning "data definition has no type or storage class" } */ diff --git a/gcc/testsuite/gcc.dg/decl-nospec-2.c b/gcc/testsuite/gcc.dg/decl-nospec-2.c index ab628949b96..a4e90522073 100644 --- a/gcc/testsuite/gcc.dg/decl-nospec-2.c +++ b/gcc/testsuite/gcc.dg/decl-nospec-2.c @@ -3,6 +3,6 @@ -pedantic. Test with -pedantic. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "-pedantic" } */ +/* { dg-options "-std=gnu89 -pedantic" } */ foo(); /* { dg-warning "data definition has no type or storage class" } */ diff --git a/gcc/testsuite/gcc.dg/decl-nospec-3.c b/gcc/testsuite/gcc.dg/decl-nospec-3.c index 8fb03ea4cc3..f0347ca2484 100644 --- a/gcc/testsuite/gcc.dg/decl-nospec-3.c +++ b/gcc/testsuite/gcc.dg/decl-nospec-3.c @@ -3,6 +3,6 @@ -pedantic. Test with -pedantic-errors. */ /* Origin: Joseph Myers */ /* { 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 a/gcc/testsuite/gcc.dg/declspec-5.c b/gcc/testsuite/gcc.dg/declspec-5.c index e44412e01c1..52b2433e26f 100644 --- a/gcc/testsuite/gcc.dg/declspec-5.c +++ b/gcc/testsuite/gcc.dg/declspec-5.c @@ -2,7 +2,7 @@ -pedantic. */ /* Origin: Joseph Myers */ /* { 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 a/gcc/testsuite/gcc.dg/declspec-6.c b/gcc/testsuite/gcc.dg/declspec-6.c index a20aa94cc80..40b77be7f96 100644 --- a/gcc/testsuite/gcc.dg/declspec-6.c +++ b/gcc/testsuite/gcc.dg/declspec-6.c @@ -2,7 +2,7 @@ -pedantic-errors. */ /* Origin: Joseph Myers */ /* { 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 a/gcc/testsuite/gcc.dg/declspec-7.c b/gcc/testsuite/gcc.dg/declspec-7.c index 370172468a8..10623e4ea77 100644 --- a/gcc/testsuite/gcc.dg/declspec-7.c +++ b/gcc/testsuite/gcc.dg/declspec-7.c @@ -4,7 +4,7 @@ gcc.dg/tls/diag-*.c. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-fgnu89-inline" } */ /* Duplicate specifiers. */ diff --git a/gcc/testsuite/gcc.dg/delay-slot-2.c b/gcc/testsuite/gcc.dg/delay-slot-2.c index 79faf81c798..d8619aac95d 100644 --- a/gcc/testsuite/gcc.dg/delay-slot-2.c +++ b/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 a/gcc/testsuite/gcc.dg/errno-1.c b/gcc/testsuite/gcc.dg/errno-1.c index 295deefbe78..46236ef5123 100644 --- a/gcc/testsuite/gcc.dg/errno-1.c +++ b/gcc/testsuite/gcc.dg/errno-1.c @@ -4,6 +4,8 @@ #include #include +void do_not_optimize_away (); + int main() { void * volatile p; diff --git a/gcc/testsuite/gcc.dg/fastmath-1.c b/gcc/testsuite/gcc.dg/fastmath-1.c index 4efe4300467..ed4f37f1477 100644 --- a/gcc/testsuite/gcc.dg/fastmath-1.c +++ b/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 a/gcc/testsuite/gcc.dg/fork-instrumentation.c b/gcc/testsuite/gcc.dg/fork-instrumentation.c index bd9bf41cd2f..f875e180882 100644 --- a/gcc/testsuite/gcc.dg/fork-instrumentation.c +++ b/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 a/gcc/testsuite/gcc.dg/ftrapv-2.c b/gcc/testsuite/gcc.dg/ftrapv-2.c index 7d765747c9c..721bece4364 100644 --- a/gcc/testsuite/gcc.dg/ftrapv-2.c +++ b/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 a/gcc/testsuite/gcc.dg/funcorder.c b/gcc/testsuite/gcc.dg/funcorder.c index 0dec72c7d02..9e4d8dedd8d 100644 --- a/gcc/testsuite/gcc.dg/funcorder.c +++ b/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 a/gcc/testsuite/gcc.dg/fwrapv-1.c b/gcc/testsuite/gcc.dg/fwrapv-1.c index f7ddda4a3b6..a172b3b8fd7 100644 --- a/gcc/testsuite/gcc.dg/fwrapv-1.c +++ b/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 a/gcc/testsuite/gcc.dg/fwrapv-2.c b/gcc/testsuite/gcc.dg/fwrapv-2.c index cb4270e0ee2..e260e545b52 100644 --- a/gcc/testsuite/gcc.dg/fwrapv-2.c +++ b/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 a/gcc/testsuite/gcc.dg/globalalias.c b/gcc/testsuite/gcc.dg/globalalias.c index 2c6ae51b4b2..fc6c7aabe67 100644 --- a/gcc/testsuite/gcc.dg/globalalias.c +++ b/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 a/gcc/testsuite/gcc.dg/inline-1.c b/gcc/testsuite/gcc.dg/inline-1.c index 4dce611d912..06059b95539 100644 --- a/gcc/testsuite/gcc.dg/inline-1.c +++ b/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 a/gcc/testsuite/gcc.dg/inline-3.c b/gcc/testsuite/gcc.dg/inline-3.c index a3de193063d..8173ae9cfa7 100644 --- a/gcc/testsuite/gcc.dg/inline-3.c +++ b/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 a/gcc/testsuite/gcc.dg/inline-33.c b/gcc/testsuite/gcc.dg/inline-33.c index d82ff71545b..a05130e6cde 100644 --- a/gcc/testsuite/gcc.dg/inline-33.c +++ b/gcc/testsuite/gcc.dg/inline-33.c @@ -5,7 +5,9 @@ int i; int foo (); +int bar (); +int main () { return foo (i); diff --git a/gcc/testsuite/gcc.dg/localalias.c b/gcc/testsuite/gcc.dg/localalias.c index 6384875b3e5..fb62066a2b4 100644 --- a/gcc/testsuite/gcc.dg/localalias.c +++ b/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 a/gcc/testsuite/gcc.dg/memmove-1.c b/gcc/testsuite/gcc.dg/memmove-1.c index 46918ee0f3f..498cf60c598 100644 --- a/gcc/testsuite/gcc.dg/memmove-1.c +++ b/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 a/gcc/testsuite/gcc.dg/non-local-goto-1.c b/gcc/testsuite/gcc.dg/non-local-goto-1.c index 2bace076fad..9c2e6cc09c0 100644 --- a/gcc/testsuite/gcc.dg/non-local-goto-1.c +++ b/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 a/gcc/testsuite/gcc.dg/non-local-goto-2.c b/gcc/testsuite/gcc.dg/non-local-goto-2.c index 24ed650a9e9..99fb1052e69 100644 --- a/gcc/testsuite/gcc.dg/non-local-goto-2.c +++ b/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 a/gcc/testsuite/gcc.dg/noreturn-8.c b/gcc/testsuite/gcc.dg/noreturn-8.c index 1e75633c812..294800baa06 100644 --- a/gcc/testsuite/gcc.dg/noreturn-8.c +++ b/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 a/gcc/testsuite/gcc.dg/parm-impl-decl-1.c b/gcc/testsuite/gcc.dg/parm-impl-decl-1.c index 467c19abdf7..5c7ddb0a259 100644 --- a/gcc/testsuite/gcc.dg/parm-impl-decl-1.c +++ b/gcc/testsuite/gcc.dg/parm-impl-decl-1.c @@ -2,7 +2,7 @@ function prototypes. Bug 18239. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu89" } */ /* Implicit function declaration in attribute in definition (testcase from bug). */ diff --git a/gcc/testsuite/gcc.dg/parm-impl-decl-3.c b/gcc/testsuite/gcc.dg/parm-impl-decl-3.c index b3941b92b62..904295258d7 100644 --- a/gcc/testsuite/gcc.dg/parm-impl-decl-3.c +++ b/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 */ /* { 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 a/gcc/testsuite/gcc.dg/parse-decl-after-if.c b/gcc/testsuite/gcc.dg/parse-decl-after-if.c index f48e6dfc26b..09afa37b472 100644 --- a/gcc/testsuite/gcc.dg/parse-decl-after-if.c +++ b/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 a/gcc/testsuite/gcc.dg/parse-decl-after-label.c b/gcc/testsuite/gcc.dg/parse-decl-after-label.c index f457c6a69bd..9c9886a108f 100644 --- a/gcc/testsuite/gcc.dg/parse-decl-after-label.c +++ b/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 a/gcc/testsuite/gcc.dg/pr18596-1.c b/gcc/testsuite/gcc.dg/pr18596-1.c index dc34f444e5d..0d8d290dcb9 100644 --- a/gcc/testsuite/gcc.dg/pr18596-1.c +++ b/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 a/gcc/testsuite/gcc.dg/pr18596-2.c b/gcc/testsuite/gcc.dg/pr18596-2.c index 7a52e807d38..9b50d012586 100644 --- a/gcc/testsuite/gcc.dg/pr18596-2.c +++ b/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 a/gcc/testsuite/gcc.dg/pr18596-3.c b/gcc/testsuite/gcc.dg/pr18596-3.c index 74a6e63b56a..c04312f0357 100644 --- a/gcc/testsuite/gcc.dg/pr18596-3.c +++ b/gcc/testsuite/gcc.dg/pr18596-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu89" } */ int foo () { diff --git a/gcc/testsuite/gcc.dg/pr19633-1.c b/gcc/testsuite/gcc.dg/pr19633-1.c index c05e46aef64..53c3935126d 100644 --- a/gcc/testsuite/gcc.dg/pr19633-1.c +++ b/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 a/gcc/testsuite/gcc.dg/pr19633.c b/gcc/testsuite/gcc.dg/pr19633.c index fda0df6c5fa..66a542a2192 100644 --- a/gcc/testsuite/gcc.dg/pr19633.c +++ b/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 a/gcc/testsuite/gcc.dg/pr23408.c b/gcc/testsuite/gcc.dg/pr23408.c index ca8193fbaf8..b552e233604 100644 --- a/gcc/testsuite/gcc.dg/pr23408.c +++ b/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 a/gcc/testsuite/gcc.dg/pr23470-1.c b/gcc/testsuite/gcc.dg/pr23470-1.c index 2ddf6f2f22f..130a3dd3c97 100644 --- a/gcc/testsuite/gcc.dg/pr23470-1.c +++ b/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 a/gcc/testsuite/gcc.dg/pr25795-1.c b/gcc/testsuite/gcc.dg/pr25795-1.c index e568b25440e..88cd88fc501 100644 --- a/gcc/testsuite/gcc.dg/pr25795-1.c +++ b/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 a/gcc/testsuite/gcc.dg/pr25795.c b/gcc/testsuite/gcc.dg/pr25795.c index decbe54e39f..37ddc0bca95 100644 --- a/gcc/testsuite/gcc.dg/pr25795.c +++ b/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 a/gcc/testsuite/gcc.dg/pr27861-1.c b/gcc/testsuite/gcc.dg/pr27861-1.c index cf269dc0ae5..8d6d791bcac 100644 --- a/gcc/testsuite/gcc.dg/pr27861-1.c +++ b/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 a/gcc/testsuite/gcc.dg/pr28121.c b/gcc/testsuite/gcc.dg/pr28121.c index 5cbf8f89e94..9e306f5930a 100644 --- a/gcc/testsuite/gcc.dg/pr28121.c +++ b/gcc/testsuite/gcc.dg/pr28121.c @@ -1,6 +1,9 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ +int GetMouseButton (); +int ParsePos (); + short GetCmd () { diff --git a/gcc/testsuite/gcc.dg/pr28243.c b/gcc/testsuite/gcc.dg/pr28243.c index 12447a1c3d3..d09639989d8 100644 --- a/gcc/testsuite/gcc.dg/pr28243.c +++ b/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 a/gcc/testsuite/gcc.dg/pr28574.c b/gcc/testsuite/gcc.dg/pr28574.c index f5ff6c01db4..b86f7f6b688 100644 --- a/gcc/testsuite/gcc.dg/pr28574.c +++ b/gcc/testsuite/gcc.dg/pr28574.c @@ -71,4 +71,5 @@ yasm_list_modules(yasm_module_type type, } } +int main() {} diff --git a/gcc/testsuite/gcc.dg/pr28888.c b/gcc/testsuite/gcc.dg/pr28888.c index c65a26a0874..3bad18b9fdf 100644 --- a/gcc/testsuite/gcc.dg/pr28888.c +++ b/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 a/gcc/testsuite/gcc.dg/pr29254.c b/gcc/testsuite/gcc.dg/pr29254.c index 598b6bf7b11..df6ba574a5d 100644 --- a/gcc/testsuite/gcc.dg/pr29254.c +++ b/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 a/gcc/testsuite/gcc.dg/pr30189.c b/gcc/testsuite/gcc.dg/pr30189.c index 6aa963e7a10..2f332fb0c39 100644 --- a/gcc/testsuite/gcc.dg/pr30189.c +++ b/gcc/testsuite/gcc.dg/pr30189.c @@ -12,7 +12,7 @@ void baz (int i) } void -bar (i) +bar (int i) { baz (i); } diff --git a/gcc/testsuite/gcc.dg/pr30260.c b/gcc/testsuite/gcc.dg/pr30260.c index f7373176ed5..e04a8beb642 100644 --- a/gcc/testsuite/gcc.dg/pr30260.c +++ b/gcc/testsuite/gcc.dg/pr30260.c @@ -3,6 +3,8 @@ /* { dg-options "-pedantic -O" } */ #include +void link_error (void); + enum A { A1 = 0, A2 = A1 - 1 diff --git a/gcc/testsuite/gcc.dg/pr31529-1.c b/gcc/testsuite/gcc.dg/pr31529-1.c index 7182e8fe6bd..24d2cdbd83e 100644 --- a/gcc/testsuite/gcc.dg/pr31529-1.c +++ b/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 a/gcc/testsuite/gcc.dg/pr31529-2.c b/gcc/testsuite/gcc.dg/pr31529-2.c index 40d8ef86830..7f8c40f49e2 100644 --- a/gcc/testsuite/gcc.dg/pr31529-2.c +++ b/gcc/testsuite/gcc.dg/pr31529-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ extern __inline +int getline () { } diff --git a/gcc/testsuite/gcc.dg/pr32573.c b/gcc/testsuite/gcc.dg/pr32573.c index d6897fbc22f..190f5dbac69 100644 --- a/gcc/testsuite/gcc.dg/pr32573.c +++ b/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 a/gcc/testsuite/gcc.dg/pr33826.c b/gcc/testsuite/gcc.dg/pr33826.c index c091bbcdb10..8d40d752f78 100644 --- a/gcc/testsuite/gcc.dg/pr33826.c +++ b/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 a/gcc/testsuite/gcc.dg/pr33923.c b/gcc/testsuite/gcc.dg/pr33923.c index d71e5578a8a..e933762b1b3 100644 --- a/gcc/testsuite/gcc.dg/pr33923.c +++ b/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 a/gcc/testsuite/gcc.dg/pr34263.c b/gcc/testsuite/gcc.dg/pr34263.c index d389eade88e..57b8f8a1429 100644 --- a/gcc/testsuite/gcc.dg/pr34263.c +++ b/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 a/gcc/testsuite/gcc.dg/pr35065.c b/gcc/testsuite/gcc.dg/pr35065.c index e5984ab0f82..8b272f8ee8d 100644 --- a/gcc/testsuite/gcc.dg/pr35065.c +++ b/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 a/gcc/testsuite/gcc.dg/pr35899.c b/gcc/testsuite/gcc.dg/pr35899.c index fca3a3d8621..7bfb53f5477 100644 --- a/gcc/testsuite/gcc.dg/pr35899.c +++ b/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 a/gcc/testsuite/gcc.dg/pr36194.c b/gcc/testsuite/gcc.dg/pr36194.c index 070a944e97f..ae660e4d577 100644 --- a/gcc/testsuite/gcc.dg/pr36194.c +++ b/gcc/testsuite/gcc.dg/pr36194.c @@ -22,6 +22,7 @@ g (long long a) asm (""); } +int main () { g (0x1234567887654321ll); diff --git a/gcc/testsuite/gcc.dg/pr38616.c b/gcc/testsuite/gcc.dg/pr38616.c index b4534b508c0..c693eece224 100644 --- a/gcc/testsuite/gcc.dg/pr38616.c +++ b/gcc/testsuite/gcc.dg/pr38616.c @@ -5,6 +5,8 @@ #include +extern int strcmp (const char *, const char *); + #define BUFFER "1234567890abcdefghijklmno" int main (void) { diff --git a/gcc/testsuite/gcc.dg/pr39867.c b/gcc/testsuite/gcc.dg/pr39867.c index cb797245292..fbe09241cbd 100644 --- a/gcc/testsuite/gcc.dg/pr39867.c +++ b/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 a/gcc/testsuite/gcc.dg/pr41470.c b/gcc/testsuite/gcc.dg/pr41470.c index 1c029b481bf..ddbe66e903b 100644 --- a/gcc/testsuite/gcc.dg/pr41470.c +++ b/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 a/gcc/testsuite/gcc.dg/pr41837.c b/gcc/testsuite/gcc.dg/pr41837.c index f96c3473540..1ff99155de7 100644 --- a/gcc/testsuite/gcc.dg/pr41837.c +++ b/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 a/gcc/testsuite/gcc.dg/pr44024.c b/gcc/testsuite/gcc.dg/pr44024.c index 6234aeca363..30eb9d1bf80 100644 --- a/gcc/testsuite/gcc.dg/pr44024.c +++ b/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 a/gcc/testsuite/gcc.dg/pr44699.c b/gcc/testsuite/gcc.dg/pr44699.c index 601cc78f572..bd2b1a87aaa 100644 --- a/gcc/testsuite/gcc.dg/pr44699.c +++ b/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 a/gcc/testsuite/gcc.dg/pr45415.c b/gcc/testsuite/gcc.dg/pr45415.c index 12d9fc0f5a1..9574b3a05d8 100644 --- a/gcc/testsuite/gcc.dg/pr45415.c +++ b/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 a/gcc/testsuite/gcc.dg/pr46252.c b/gcc/testsuite/gcc.dg/pr46252.c index 70bf21d6c07..6df4f2cb859 100644 --- a/gcc/testsuite/gcc.dg/pr46252.c +++ b/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 a/gcc/testsuite/gcc.dg/pr46878-1.c b/gcc/testsuite/gcc.dg/pr46878-1.c index f5b42de118b..b8722a40623 100644 --- a/gcc/testsuite/gcc.dg/pr46878-1.c +++ b/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 a/gcc/testsuite/gcc.dg/pr47443.c b/gcc/testsuite/gcc.dg/pr47443.c index fa7d6b98ad3..47abea27dd7 100644 --- a/gcc/testsuite/gcc.dg/pr47443.c +++ b/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 a/gcc/testsuite/gcc.dg/pr47763.c b/gcc/testsuite/gcc.dg/pr47763.c index a5da2de3f4b..60fad41291b 100644 --- a/gcc/testsuite/gcc.dg/pr47763.c +++ b/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 a/gcc/testsuite/gcc.dg/pr49000.c b/gcc/testsuite/gcc.dg/pr49000.c index 32a1cdb35f7..996b8f6b1ac 100644 --- a/gcc/testsuite/gcc.dg/pr49000.c +++ b/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 a/gcc/testsuite/gcc.dg/pr50340.c b/gcc/testsuite/gcc.dg/pr50340.c index 18430366fe1..b608b3836d4 100644 --- a/gcc/testsuite/gcc.dg/pr50340.c +++ b/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 a/gcc/testsuite/gcc.dg/pr50908-3.c b/gcc/testsuite/gcc.dg/pr50908-3.c index 60db03dae85..9103e6bdf41 100644 --- a/gcc/testsuite/gcc.dg/pr50908-3.c +++ b/gcc/testsuite/gcc.dg/pr50908-3.c @@ -3,6 +3,7 @@ extern int v1; extern int v2; +void g (void); void f () diff --git a/gcc/testsuite/gcc.dg/pr50908.c b/gcc/testsuite/gcc.dg/pr50908.c index 75341f8f105..114dded3ab1 100644 --- a/gcc/testsuite/gcc.dg/pr50908.c +++ b/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 a/gcc/testsuite/gcc.dg/pr51796.c b/gcc/testsuite/gcc.dg/pr51796.c index c07ad1087cc..64a60953519 100644 --- a/gcc/testsuite/gcc.dg/pr51796.c +++ b/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 a/gcc/testsuite/gcc.dg/pr52808.c b/gcc/testsuite/gcc.dg/pr52808.c index b731cb40133..8a33d08d860 100644 --- a/gcc/testsuite/gcc.dg/pr52808.c +++ b/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 a/gcc/testsuite/gcc.dg/pr55150-2.c b/gcc/testsuite/gcc.dg/pr55150-2.c index 1be769d37a7..ed571d64888 100644 --- a/gcc/testsuite/gcc.dg/pr55150-2.c +++ b/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 a/gcc/testsuite/gcc.dg/pr55833.c b/gcc/testsuite/gcc.dg/pr55833.c index 7a5c549d786..b35104b44e8 100644 --- a/gcc/testsuite/gcc.dg/pr55833.c +++ b/gcc/testsuite/gcc.dg/pr55833.c @@ -3,6 +3,7 @@ /* { dg-options "-O3" } */ int a, b, c; +int bar (void); void foo() { diff --git a/gcc/testsuite/gcc.dg/pr59350.c b/gcc/testsuite/gcc.dg/pr59350.c index fa632454ae1..3d38486760f 100644 --- a/gcc/testsuite/gcc.dg/pr59350.c +++ b/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 a/gcc/testsuite/gcc.dg/pr59418.c b/gcc/testsuite/gcc.dg/pr59418.c index 257ce79f199..12999aa49e8 100644 --- a/gcc/testsuite/gcc.dg/pr59418.c +++ b/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 a/gcc/testsuite/gcc.dg/pr59940.c b/gcc/testsuite/gcc.dg/pr59940.c index d81eaf78e15..6dba8c713fc 100644 --- a/gcc/testsuite/gcc.dg/pr59940.c +++ b/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 a/gcc/testsuite/gcc.dg/pr59963-1.c b/gcc/testsuite/gcc.dg/pr59963-1.c index 4a369db4863..dbb347f990e 100644 --- a/gcc/testsuite/gcc.dg/pr59963-1.c +++ b/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 a/gcc/testsuite/gcc.dg/pr60139.c b/gcc/testsuite/gcc.dg/pr60139.c index a63d8b5b9bd..96e42ed9c8d 100644 --- a/gcc/testsuite/gcc.dg/pr60139.c +++ b/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 a/gcc/testsuite/gcc.dg/pr60647-1.c b/gcc/testsuite/gcc.dg/pr60647-1.c index 73ea8568807..99f5919c34c 100644 --- a/gcc/testsuite/gcc.dg/pr60647-1.c +++ b/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 a/gcc/testsuite/gcc.dg/pr60647-2.c b/gcc/testsuite/gcc.dg/pr60647-2.c index ddeb1178523..60655bf54ec 100644 --- a/gcc/testsuite/gcc.dg/pr60647-2.c +++ b/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 a/gcc/testsuite/gcc.dg/pr63186.c b/gcc/testsuite/gcc.dg/pr63186.c index b3648757c7a..8efb750a9b2 100644 --- a/gcc/testsuite/gcc.dg/pr63186.c +++ b/gcc/testsuite/gcc.dg/pr63186.c @@ -25,6 +25,8 @@ foo () { bar (); } + +int main() { } diff --git a/gcc/testsuite/gcc.dg/pragma-diag-1.c b/gcc/testsuite/gcc.dg/pragma-diag-1.c index b6d294d9ab5..d0bb0d6f66c 100644 --- a/gcc/testsuite/gcc.dg/pragma-diag-1.c +++ b/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 a/gcc/testsuite/gcc.dg/redecl-15.c b/gcc/testsuite/gcc.dg/redecl-15.c index d2f48bd79b2..ff484c99542 100644 --- a/gcc/testsuite/gcc.dg/redecl-15.c +++ b/gcc/testsuite/gcc.dg/redecl-15.c @@ -2,7 +2,7 @@ despite incompatible type. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu89" } */ void f (void) diff --git a/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int.c b/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int.c index d03e8318108..a40c3ddcb31 100644 --- a/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int.c +++ b/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 a/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int128.c b/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int128.c index 651e76a95a5..759a83d22f7 100644 --- a/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int128.c +++ b/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int128.c @@ -120,6 +120,7 @@ void simulate_thread_main() } } +int main() { fill_table (); diff --git a/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-longlong.c b/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-longlong.c index 91f9a062714..524b9845b91 100644 --- a/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-longlong.c +++ b/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 a/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-short.c b/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-short.c index e7b54c46bef..62690cea5f8 100644 --- a/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-short.c +++ b/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 a/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-int.c b/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-int.c index 990310c0f0e..89871c030c9 100644 --- a/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-int.c +++ b/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 a/gcc/testsuite/gcc.dg/sms-1.c b/gcc/testsuite/gcc.dg/sms-1.c index 26e502e2cca..3713dc67922 100644 --- a/gcc/testsuite/gcc.dg/sms-1.c +++ b/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 a/gcc/testsuite/gcc.dg/uninit-suppress.c b/gcc/testsuite/gcc.dg/uninit-suppress.c index be3b4c1ab4f..53e6bcf118a 100644 --- a/gcc/testsuite/gcc.dg/uninit-suppress.c +++ b/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 a/gcc/testsuite/gcc.dg/uninit-suppress_2.c b/gcc/testsuite/gcc.dg/uninit-suppress_2.c index e1497347336..a4371ecc22a 100644 --- a/gcc/testsuite/gcc.dg/uninit-suppress_2.c +++ b/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 a/gcc/testsuite/gcc.dg/unused-3.c b/gcc/testsuite/gcc.dg/unused-3.c index 120562448aa..cd64abd4b80 100644 --- a/gcc/testsuite/gcc.dg/unused-3.c +++ b/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 a/gcc/testsuite/gcc.dg/utf-dflt.c b/gcc/testsuite/gcc.dg/utf-dflt.c index f672f0af57a..fc830d878a6 100644 --- a/gcc/testsuite/gcc.dg/utf-dflt.c +++ b/gcc/testsuite/gcc.dg/utf-dflt.c @@ -1,7 +1,7 @@ /* Contributed by Kris Van Hees */ /* 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 a/gcc/testsuite/gcc.dg/utf-dflt2.c b/gcc/testsuite/gcc.dg/utf-dflt2.c index 022c081fdb7..bf2210c4625 100644 --- a/gcc/testsuite/gcc.dg/utf-dflt2.c +++ b/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 a/gcc/testsuite/gcc.dg/va-arg-pack-1.c b/gcc/testsuite/gcc.dg/va-arg-pack-1.c index 09ae97917e4..888f3d78000 100644 --- a/gcc/testsuite/gcc.dg/va-arg-pack-1.c +++ b/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 a/gcc/testsuite/gcc.dg/varpool-1.c b/gcc/testsuite/gcc.dg/varpool-1.c index 48f1cd3593c..cb7aebdb9ca 100644 --- a/gcc/testsuite/gcc.dg/varpool-1.c +++ b/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 a/gcc/testsuite/gcc.dg/webizer.c b/gcc/testsuite/gcc.dg/webizer.c index 4f03037c500..982fbca4201 100644 --- a/gcc/testsuite/gcc.dg/webizer.c +++ b/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 a/gcc/testsuite/gcc.dg/winline-2.c b/gcc/testsuite/gcc.dg/winline-2.c index 584c68fddf6..f47c38c7095 100644 --- a/gcc/testsuite/gcc.dg/winline-2.c +++ b/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 a/gcc/testsuite/gcc.dg/winline-3.c b/gcc/testsuite/gcc.dg/winline-3.c index fc12f573ab0..0540a243e24 100644 --- a/gcc/testsuite/gcc.dg/winline-3.c +++ b/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 a/gcc/testsuite/gcc.dg/winline-5.c b/gcc/testsuite/gcc.dg/winline-5.c index a42ae943fe0..da4be45eb29 100644 --- a/gcc/testsuite/gcc.dg/winline-5.c +++ b/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 a/gcc/testsuite/gcc.dg/winline-6.c b/gcc/testsuite/gcc.dg/winline-6.c index 4e22ce14455..35e3aacb4b8 100644 --- a/gcc/testsuite/gcc.dg/winline-6.c +++ b/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 a/gcc/testsuite/gcc.dg/winline-7.c b/gcc/testsuite/gcc.dg/winline-7.c index 19262da7c55..33ad74b43c1 100644 --- a/gcc/testsuite/gcc.dg/winline-7.c +++ b/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 a/gcc/testsuite/gcc.dg/winline-9.c b/gcc/testsuite/gcc.dg/winline-9.c index fddf5c68f0c..c8b18c912a8 100644 --- a/gcc/testsuite/gcc.dg/winline-9.c +++ b/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 a/gcc/testsuite/gcc.dg/wtr-func-def-1.c b/gcc/testsuite/gcc.dg/wtr-func-def-1.c index 049e05b8551..bc5a91b5f8d 100644 --- a/gcc/testsuite/gcc.dg/wtr-func-def-1.c +++ b/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 6/30/2002. */ /* { dg-do compile } */ -/* { dg-options "-Wtraditional" } */ +/* { dg-options "-Wtraditional -std=gnu89" } */ /* Test some simple cases. */