🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1001

missing warning?

#1001
From: 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
Technical Details
Message-ID: <199208261853.AA05452@claude.cs.umb.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!claude.cs.umb.edu!karl

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!claude.cs.umb.edu!karl
From: karl@claude.cs.umb.edu (Karl Berry)
Subject: missing warning?
Message-ID: <199208261853.AA05452@claude.cs.umb.edu>
Sender: gnulists@ai.mit.edu
Reply-To: karl@cs.umb.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 26 Aug 1992 10:53:12 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 26