🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2260

unexpected warning in gcc 1.33

#2260
From: Andy Fyfe
Date: Thu, 09 Feb 1989 02:15
18 lines
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!andy

Show 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