🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Karl Berry Wed, 26 Aug 1992 10:53
missing warning?
#1001
Author: Karl Berry
Date: Wed, 26 Aug 1992 10:53
25 lines
1515 bytes
The following (meaningless) two-line program does not get a warning when
compiled with -Wall on a 486 running Interactive Unix (configured as
`--with-gnu-as i386-isc').  (I doubt this is a machine-dependent
phenomenom.)

static void foo ();
void foo () { foo (); }

bash$ gcc -v -c -Wall /tmp/test.c
Reading specs from /usr/local/gnu/lib/gcc-lib/i386-isc/2.2.2/specs
gcc version 2.2.2
 /usr/local/gnu/lib/gcc-lib/i386-isc/2.2.2/cpp -lang-c -v -undef -D__GNUC__=2 -Dunix -Di386 -D__unix__ -D__i386__ -D__unix -D__i386 -Wall /tmp/test.c /tmp/cca04478.i
GNU CPP version 2.2.2 (80386, BSD syntax)
 /usr/local/gnu/lib/gcc-lib/i386-isc/2.2.2/cc1 /tmp/cca04478.i -quiet -dumpbase test.c -Wall -version -o /tmp/cca04478.s
GNU C version 2.2.2 (80386, BSD syntax) compiled by GNU C version 2.2.1.
 /usr/local/gnu/lib/gcc-lib/i386-isc/2.2.2/as -o test.o /tmp/cca04478.s
bash$ 

Since having the `static' on only the definition provokes a warning, I
expected the converse -- having `static' only on the declaration -- to do
so also.

Apologies if I missed this in the documentation.

karl@cs.umb.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads