Article View: gnu.gcc.bug
Article #2260unexpected warning in gcc 1.33
From: Andy Fyfe
Date: Thu, 09 Feb 1989 02:15
Date: Thu, 09 Feb 1989 02:15
18 lines
848 bytes
848 bytes
The following program gives a warning I wasn't expecting. (This is
reduced from gnu tar.) I don't know what ansi says about it -- I
only have K&R2 as a reference.
struct one {
char buf[10];
};
struct one *f();
char *
g()
{
return f()->buf;
}
The warning follows (from "gcc -c x.c"):
x.c: In function g:
x.c:10: warning: return of non-volatile * pointer from volatile *
Technical Details
Message-ID:
<8902090215.AA03696@csvax.caltech.edu>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!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!uflorida!gatech!tut.cis.ohio-state.edu!CSVAX.CALTECH.EDU!andy From: andy@CSVAX.CALTECH.EDU (Andy Fyfe) Newsgroups: gnu.gcc.bug Subject: unexpected warning in gcc 1.33 Message-ID: <8902090215.AA03696@csvax.caltech.edu> Date: 9 Feb 89 02:15:33 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 18