Article View: gnu.gcc.bug
Article #1603Mismatched function storage class not reported--OK?
From: Mitchell Perilstein
Date: Thu, 07 Jan 1993 17:07
Date: Thu, 07 Jan 1993 17:07
26 lines
1174 bytes
1174 bytes
If this file
static int foo();
int foo()
{
return 1;
}
is compiled -Wall -c, no warning is issued regarding mismatched storage
class between the declaration and the definition. The function is taken
to be static, as shown by nm on the result (`t' indicates static symbol
in SunOS nm):
00000000 t _foo
00000000 t gcc2_compiled.
Taking foo as static is OK, since the first external declaration
specifies static. The Standard describes how the types must all match
up, but what does it say about storage classes? Should a warning be
issued?
This is gcc 2.1 on Sun4 SunOS 4.1.2.
---
Mitchell N. Perilstein CAD Language Systems, Inc. 410-992-5700 x225
Member, League for Programming Freedom. Mail lpf@uunet.uu.net for info.
Technical Details
Message-ID:
<9301071707.AA13194@clsi.clsi.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!clsi.UUCP!mitchShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!clsi.UUCP!mitch From: mitch@clsi.UUCP (Mitchell Perilstein) Subject: Mismatched function storage class not reported--OK? Message-ID: <9301071707.AA13194@clsi.clsi.COM> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 7 Jan 1993 17:07:43 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 27