* 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
+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.
+
2014-10-06 Marek Polacek <polacek@redhat.com>
* gcc.dg/ipa/inline-2.c: Fix implicit declarations.
return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d);
}
+int
main ()
{
if (foo() != 1.0)
return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d);
}
+int
main ()
{
if (baz("") != 1.0)
return foo (x);
}
+int
main()
{
if (bar (0, 2.0) != 26)
/* { dg-options "-fshow-column" } */
+void
foo()
{
char d;
struct { union {int x; int y;}; int q; } b;
union { struct {int x;}; int q; } e;
+int
main()
{
b.y = 10;
typedef struct _RectObjRec *RectObj;
SmeObject DoGetEventEntry();
+int XtWidgetToApplicationContext();
+void XtAppError();
+void Unhighlight();
+void XtMoveWidget();
+void XWarpPointer();
SmeObject
GetEventEntry(Widget w, XEvent *event)
});
}
+int
main()
{
B = 5;
/* { dg-options "-O2 -fpic -fprofile-arcs" } */
/* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */
+int fork (void);
+
void test (void)
{
fork ();
/* 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 ()
{
/* { dg-do compile } */
/* { dg-options "-O" } */
+void Get16u();
typedef struct { int ThumbnailSize; } ImageInfo_t;
double ConvertAnyFormat(void)
return (a+b+c);
}
+int
main ()
{
double f1, f2, f3, f4, f5, f6, f7, f8, f9,f10;
/* PR rtl-optimization/18611 */
/* { dg-do compile } */
/* { dg-options "-O1 -fmove-loop-invariants" } */
+
+void dumpCineonChannelInfo ();
typedef struct {
int channels_per_image;
int channel[8];
/* { 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" } */
/* { 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,
void set (struct s* p, int flags) {
p->g = flags << 1;
}
+
+int
main() {
struct s foo = {0 , 0, 3, 0};
set (&foo, -1);
large for a 16bit constant and therefore should reserve the literal
pool base pointer. */
+void g ();
+
int f () {
char a[32608];
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;
/* { 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" } */
/* { dg-do compile } */
/* { dg-options "-O2 -fno-crossjumping" } */
+int bar1 ();
+int bar2 ();
+
int foo (void)
{
int len;
/* { dg-do compile } */
-/* { dg-options "-Wtraditional" } */
+/* { dg-options "-Wtraditional -std=gnu89" } */
int
x (b)
#pragma GCC diagnostic error "-Waddress"
+void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i;
#pragma GCC diagnostic error "-Waddress"
+void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i;
#pragma GCC diagnostic warning "-Waddress"
+void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i;
#pragma GCC diagnostic ignored "-Waddress"
+void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning "attribute directive ignored" } */
int i;
/* 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;
/* Make sure the command line option enables the warning. */
+void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */
int i;
#pragma GCC diagnostic error "-Waddress"
+void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning "attribute directive ignored" } */
int i;
/* Make sure -Werror turns warnings in to errors. */
+void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i;
/* { 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;
/* Make sure -Wno-error= overrides -Werror. */
+void grill ();
void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
int i;
#pragma GCC diagnostic warning "-Waddress"
+void grill ();
void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */
int i;
/* 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'" } */
/* 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" } */
/* 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;
/* { 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" } */
/* { 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)
/* { 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" } */
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
Source: Neil Booth, 26 Jan 2002.
*/
-/* { dg-options -pedantic } */
+/* { dg-options "-pedantic -std=gnu89" } */
enum foo {e1 = 0, e2, e3, e4, e5};
/* 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;
/* 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 } */
#define g(x) x
extern void abort (void);
+extern int strcmp (const char *, const char *);
void testquoting ()
{
-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" } */
-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" } */
-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" } */
-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
-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
gcc.dg/tls/diag-*.c. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-fgnu89-inline" } */
/* Duplicate specifiers. */
extern int printf (__const char *__restrict __format, ...);
extern void print_c_condition (const char *);
+extern void print_host_wide_int (long);
enum decision_type
{
#include <errno.h>
#include <stdlib.h>
+void do_not_optimize_away ();
+
int main()
{
void * volatile p;
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. };
/* { dg-do compile } */
/* { dg-options "-O0 -fprofile-generate" } */
int fork(void);
+int
t()
{
fork ();
/* { dg-require-effective-target trapping } */
extern void abort(void);
+extern int abs(int);
extern long labs(long);
int __attribute__((noinline))
/* 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)
return (2*x)/2;
}
+int
main()
{
int x = INT_MAX;
return (2*x)/2;
}
+int
main()
{
int x = INT_MAX;
{ dg-additional-sources "globalalias-2.c" } */
extern int test2count;
extern void abort (void);
+extern void tt ();
int testcount;
static
void test(void)
/* 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. */
/* { 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
int i;
int foo ();
+int bar ();
+int
main ()
{
return foo (i);
{ 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))
{
__builtin_memmove (dest, src, len);
}
+int
t()
{
domem (b,a,100);
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 ();
}
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;
/* { dg-options "-O2" } */
void exit (int);
void noreturn_autodetection_failed ();
-__attribute__ ((noinline))
+__attribute__ ((noinline)) int
detect_noreturn ()
{
exit (0);
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). */
/* 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" } */
{ dg-options "-fsyntax-only" }
*/
-void f(x)
+void f(int x)
{
if (x > 1)
int ret = 1; /* { dg-error "expected expression before 'int'" } */
{ dg-options "-fsyntax-only" }
*/
-int f(x)
+int f(int x)
{
if (x > 1)
{
/* { dg-do compile } */
-/* { dg-options "-fno-unit-at-a-time" } */
+/* { dg-options "-fno-unit-at-a-time -std=gnu89" } */
int f(int i)
{
/* { dg-do compile } */
-/* { dg-options "-funit-at-a-time" } */
+/* { dg-options "-funit-at-a-time -std=gnu89" } */
int f(int i)
{
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu89" } */
int foo ()
{
/* { dg-options "-O2" } */
extern void abort (void);
+extern void link_error (void);
struct S
{
struct S s;
};
+void link_error (void);
+int bar (struct S, int);
+
void
foo (int a, struct T b)
{
/* { 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 (); }
/* { 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)
extern const char *mystr; /* normally in a header */
const char *mystr;
+int
main()
{
}
extern const char *mystr; /* normally in a header */
const char *mystr __attribute__ ((externally_visible));
+int
main()
{
}
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)
{
/* { dg-do compile } */
/* { dg-options "-O2" } */
+int GetMouseButton ();
+int ParsePos ();
+
short
GetCmd ()
{
struct displayfuncs *funcs;
};
+void PSDoArc ();
+
static void PSMyArc(double cx, double cy, double radx, double rady, double sa,
double ta)
{
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;
/* { 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" } */
}
void
-bar (i)
+bar (int i)
{
baz (i);
}
/* { dg-options "-pedantic -O" } */
#include <limits.h>
+void link_error (void);
+
enum A {
A1 = 0,
A2 = A1 - 1
/* { dg-do link } */
/* { dg-require-effective-target lto } */
-/* { dg-options "-flto" } */
+/* { dg-options "-flto -fgnu89-inline" } */
/* { dg-additional-sources "pr31529-2.c" } */
+int
getline ()
{
}
/* { dg-do compile } */
extern __inline
+int
getline ()
{
}
/* { dg-do compile } */
/* { dg-options "-O3" } */
+long long bar (void *);
+
int
foo (void *x, long long *y)
{
/* { 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);
}
ProtocolOperations;
static const ProtocolOperations *protocol;
+int
brl_readCommand (void)
{
unsigned long int keys;
void sub( struct s *p, struct s **pp );
int look( struct s *p, struct s **pp );
+int
main()
{
struct s *pp;
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 ) {
{
};
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;
/* PR tree-optimization/35899 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu89 -O2" } */
int
foo (void)
asm ("");
}
+int
main ()
{
g (0x1234567887654321ll);
#include <stdio.h>
+extern int strcmp (const char *, const char *);
+
#define BUFFER "1234567890abcdefghijklmno"
int main (void)
{
/* { dg-do link } */
/* { dg-options "-O2" } */
+extern void link_error (void);
+
int main (void)
{
int exp = -1;
/* { dg-do compile } */
/* { dg-options "-fexceptions" } */
+
+void cf (void *);
+
void *
af (void *a)
{
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)
{
/* { dg-options "-O1 -fdelete-null-pointer-checks -fdump-tree-ccp1" } */
void foo();
+void link_error (void);
int main()
{
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)
void abort (void);
void exit (int);
+int
main ()
{
t_be x;
/* { 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)
{
/* { dg-do compile } */
/* { dg-options "-O2" } */
+int __foo (void);
+int __bar (void);
+
struct baz
{
int *newp;
/* { 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;
}
/* { dg-do compile } */
/* { dg-options "-O2 -funroll-loops -fdump-rtl-web" } */
+int
foo()
{
}
/* { dg-do compile } */
/* { dg-options "-O2 -g" } */
-static
+static int
foo (int x, int y)
{
return x * y;
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;
extern int v1;
extern int v2;
+void g (void);
void
f ()
};
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;
{
/* { 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)
i = 0;
for (;; i++)
if (*fn1 ()[i] && !'a' <= 0 && i <= 'z' || *fn1 ()[0] && 'a' <= 'z')
- return;
+ return 0;
}
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;
/* { dg-options "-O3" } */
int a, b, c;
+int bar (void);
void foo()
{
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,
/* { 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)
/* { dg-options "-Wconversion -Woverflow" } */
int f (unsigned int);
-typedef sitype __attribute__((mode(SI)));
+typedef int sitype __attribute__((mode(SI)));
int
g (void)
/* PR c/59963 */
/* { dg-do compile } */
-/* { dg-options "-Wdouble-promotion" } */
+/* { dg-options "-std=gnu89 -Wdouble-promotion" } */
extern void baz ();
extern void qux (int, ...);
/* PR c/60139 */
/* { dg-do compile } */
-/* { dg-options "-Wpedantic" } */
+/* { dg-options "-Wpedantic -std=gnu89" } */
/* { dg-prune-output ".*near initialization for.*" } */
double sin (double);
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);
int width, height;
};
+void fn1 (int);
+void fn2 (int, int, int *);
+
static void
foo (void *dpy, struct _wincore *winInfo, int offset)
{
{
bar ();
}
+
+int
main()
{
}
/* { dg-options "-Wuninitialized -O2" } */
/* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
+void foo (int);
+
+int
main()
{
int a;
despite incompatible type. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu89" } */
void
f (void)
}
}
+int
main()
{
simulate_thread_main ();
}
}
+int
main()
{
fill_table ();
}
}
+int
main()
{
simulate_thread_main ();
}
}
+int
main()
{
simulate_thread_main ();
test_abort ();
}
+int
main ()
{
simulate_thread_main ();
__attribute__ ((noinline))
void
-f (m)
+f (int m)
{
int i;
int sh = 0x100;
/* { 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()
/* { 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()
/* { dg-options "-Wunused" } */
typedef short unused_type __attribute__ ((unused));
+int
main ()
{
short
/* 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 } */
/* 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 } */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fgnu89-inline" } */
int bar (int, const char *, int, ...);
int baz (int, const char *, long int);
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)
return unnecesary_static_initialized_variable;
}
+int
main ()
{
return simplify_after_inline (unnecesary_static_initialized_variable,
double ckt_size_factor ;
__attribute__ ((noinline))
+int
configure2()
{
block = 0 ;
}
}
+int
main()
{
configure2();
/* { 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)
/* { 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" "" } */
/* { 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" } */
/* { 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" } */
/* { dg-do compile } */
-/* { dg-options "-Winline -O2" } */
+/* { dg-options "-Winline -O2 -fgnu89-inline" } */
extern void *alloca (__SIZE_TYPE__);
/* { 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 *);
test(t);
}
+int
t()
{
if (a)
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. */