Article View: gnu.gcc.bug
Article #2553BUG(s) in GCC 1.34(+)
From: Ron Guilmette
Date: Sat, 22 Apr 1989 19:22
Date: Sat, 22 Apr 1989 19:22
30 lines
1330 bytes
1330 bytes
When compiled with -ansi and -pedantic, the following source file
gets 4 warnings. I believe that the intent of -pedantic was to
provide GCC with fully ANSI conformant behavior. Therefore, I
believe that the following code should generate 4 ERRORS rather
than 4 WARNINGS when -ansi and -pedantic are used.
(Side note: future ANSI-C test suites may contain (pedantic)
tests such as the following. If GCC cannot be made to handle
such tests in an ANSI-conformant way, then such suites will
(rightfully) claim that GCC is *not* ANSI conformant.)
----------------------------------------------------------------
/*
Check that it is illegal to try to apply the sizeof operator
to the name of a function.
*/
extern void extern_function ();
int i = sizeof (extern_function); /* ERROR */
int j = sizeof extern_function; /* ERROR */
void test ()
{
int i = sizeof (test); /* ERROR */
int j = sizeof test; /* ERROR */
i = j;
}
Technical Details
Message-ID:
<8904221922.AA20996@riunite.aca.mcc.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MCC.COM!rfgShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MCC.COM!rfg From: rfg@MCC.COM (Ron Guilmette) Newsgroups: gnu.gcc.bug Subject: BUG(s) in GCC 1.34(+) Message-ID: <8904221922.AA20996@riunite.aca.mcc.com> Date: 22 Apr 89 19:22:45 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 30