Article View: gnu.gcc.bug
Article #76gcc2.31/sun4/sunos4.1 *MINOR* -Wredundant-decls give spurious warnings
From: Ed Oskiewicz
Date: Wed, 04 Nov 1992 15:33
Date: Wed, 04 Nov 1992 15:33
37 lines
1391 bytes
1391 bytes
Synopsis:
Declaring an extern function in traditional form followed by a declaration
with prototype causes warnings from -Wredundant-decls. The following minimal
program exercises the diagnostic (in practice the declarations are in separate
header files):
/* Compile by gcc -ansi -Wall -Wredundant-decls test.c */
#include <stdio.h>
int foo();
int foo(int a, int b);
void main()
{
}
foo(int a, int b)
{
return a+b;
}
/* End of example */
I don't know whether this is strictly a bug or not but the effects are
annoying. Surely in this case the redeclaration has an effect insofar as
prototype information is being supplied and so warnings should not result.
Cheers,
Ed Oskiewicz
email: eo@ansa.co.uk (mcsun!uknet!ansa!eo) ANSA,
tel: +44 223 323 010 Poseidon House,
fax: +44 223 359 779 Castle Park,
Cambridge CB3 0RD, UK
Technical Details
Message-ID:
<9211041533.AA21817@caligula.ansa.co.uk.ansa.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ansa.co.UK!eoShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ansa.co.UK!eo From: eo@ansa.co.UK (Ed Oskiewicz) Subject: gcc2.31/sun4/sunos4.1 *MINOR* -Wredundant-decls give spurious warnings Message-ID: <9211041533.AA21817@caligula.ansa.co.uk.ansa.co.uk> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 4 Nov 1992 15:33:36 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 38