meb@mullian.ee.mu.OZ.AU (Matthew Barry) (09/15/89)
The following code produced an invalid warning from gcc: #include <stdio.h> static void x( void ) { printf( "hello\n" ); } int main() { /*static*/ void x( void ); x(); return 1; } The compilation command was gcc -Wall -O -c t.c. This error shows up with the gcc patched for protoization and an unpatched gcc. The compiler was built from the configuraion given by: config.gcc sun4-os4. gcc version 1.35.p /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__OPTIMIZE__ -Wall t.c /tmp/cca00805.cpp GNU CPP version 1.35.p /usr/local/lib/gcc-cc1 /tmp/cca00805.cpp -quiet -dumpbase t.c -O -Wall -version -o /tmp/cca00805.s GNU C version 1.35.p (sparc) compiled by GNU C version 1.35.p. t.c:5: warning: `x' defined but not used as -o t.o /tmp/cca00805.s Matthew Barry