Path: 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 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; }