4 * This is is a regression test for all the things that gcc is meant to warn
7 * gcc version 3 breaks several tests:
9 * -W does not report missing return value
11 * -Wunused does not report unused parameter
19 /* -Wmissing-prototypes: no previous prototype for 'test1' */
20 /* -Wimplicit: return type defaults to `int' */
23 /* -Wunused: unused variable `foo' */
26 /* -Wparentheses: suggest parentheses around && within || */
27 printf("%d\n", 1 && 2 || 3 && 4);
28 /* -W: statement with no effect */
31 /* -W: control reaches end of non-void function */
35 /* -W??????: unused parameter `foo' */
42 /* -Wuninitialized: 'bar' might be used uninitialized in this function */
43 /* -Wformat: format argument is not a pointer (arg 2) */
45 /* -Wformat: too few arguments for format */
46 printf("%s%s\n", "bar");
47 /* -Wformat: too many arguments for format */
48 printf("%s\n", "bar", "bar");
50 /* -Wswitch: enumeration value `b' not handled in switch */
57 /* -Wstrict-prototypes: function declaration isn't a prototype */