Article View: gnu.gcc.bug
Article #2287misleading line number in gcc 1.33 warning
From: Andy Fyfe
Date: Mon, 13 Feb 1989 21:36
Date: Mon, 13 Feb 1989 21:36
19 lines
887 bytes
887 bytes
The 'previous declaration' should point back to the reference in 'test.h'.
(This was a rather confusing warning for a long time because I wasn't
looking in the right place.)
% cat test.h
int one(void);
% cat test.c
#include "test.h"
static int one(void);
static int one(void)
{
return 1;
}
% gcc -c test.c
test.c: In function one:
test.c:6: warning: `one' was declared `extern' and later `static'
test.c:3: warning: previous declaration of `one'
Technical Details
Message-ID:
<8902132136.AA02525@csvax.caltech.edu>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!CSVAX.CALTECH.EDU!andyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!CSVAX.CALTECH.EDU!andy From: andy@CSVAX.CALTECH.EDU (Andy Fyfe) Newsgroups: gnu.gcc.bug Subject: misleading line number in gcc 1.33 warning Message-ID: <8902132136.AA02525@csvax.caltech.edu> Date: 13 Feb 89 21:36:13 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 19