🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6176

Re: Possible gcc bugs?

#6176
From: Bhyrava Prasad
Date: Thu, 21 Nov 1996 00:00
48 lines
1957 bytes
Mr. Jolt Cola wrote:
> 
> > Bhyrava Prasad wrote:
> > >
> > > Hi ,
> > >    I am using gcc to cross complile for 68k on a Sun.
> > > gcc --version says it is 2.7-96q1.
> > >     Due to some error in cut and paste , I had a piece of code
> > > similar to
> > >     void foo()
> > >     {
> > >       void foo()
> > >       {
> > >           int i;
> > >
> > >           some_function(i);
> > >           printf("hello world\n");
> > >        }
> > >      }
> > >
> > >    And gcc compiled it just fine. Is this a bug? If not , what
> > > is happening?
> >
> > No, it's not a bug. Your code is correct so why do you want gcc to
> > complain ?
> 
> Nested functions are legal ANSI C? I never knew this.
> 
>         Melvin Smith

Please also note that the nested function had the same name, if that
makes a difference.

Also , in my original post (which I cannot find now - our NNTP feed
seems to be having some probs) , I think I reported that 
there was a newline in a string and I gave a #define as an
example. This is not where it happened. 

The newline was in a printf format string. Example:

   printf("hello
     world");

The newline accidentally got inserted in between the hello and world.
I believe this is an error , at least in ANSI C.

- Bhyrava Prasad
Technical Details
Message-ID: <3294E9CA.41C67EA6@cisco.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <9611211746.AA01271@quix.robins.af.mil>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,24b2793880e68d18
X-Google-Attributes: gid113d02,public
From: prasadb@cisco.com (Bhyrava Prasad)
Subject: Re: Possible gcc bugs?
Date: 1996/11/21
Message-ID: <3294E9CA.41C67EA6@cisco.com>
X-Deja-AN: 197947493
sender: bug-gcc-request@prep.ai.mit.edu
references: <9611211746.AA01271@quix.robins.af.mil>
content-type: text/plain; charset=us-ascii
organization: cisco Systems, Incorporated
x-gateway: relay6.UU.NET from bug-gcc to gnu.gcc.bug; Thu, 21 Nov 1996 18:47:18 EST
mime-version: 1.0
newsgroups: gnu.gcc.bug
x-mailer: Mozilla 3.0 (X11; I; SunOS 4.1.4 sun4m)