public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Name lastlong <brew_pt@yahoo.com>
To: Nathan Sidwell <nathan@codesourcery.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Is this a bug in gcc??
Date: Wed, 01 Dec 2004 11:55:00 -0000	[thread overview]
Message-ID: <20041201115516.5861.qmail@web53208.mail.yahoo.com> (raw)
In-Reply-To: <41ADA4DE.9060002@codesourcery.com>

Ok agreed!

But don't you think that C compiler (gcc) also output
this error? 
My observation is gcc outputs error only if we try to
initialise both instant of "a".

Regards.

--- Nathan Sidwell <nathan@codesourcery.com> wrote:

> Name lastlong wrote:
> > Hi,
> > 
> > I am expecting a error (redefinition of "a") from
> > following piece of code. But gcc (3.4.2) doesnot
> give
> > any error.
> > /////////////////
> > int a;
> > char b;
> > int a;
> > 
> > void foo(void)
> > {
> > return;
> > }
> > /////////////////
> > Instead, if we try initialising "a" at BOTH the
> > places, then it gives error.
> > VC++ gives this error anyway.
> 
> VC++ is a C++ compiler, where the above is an error
> gcc is a C compiler, where the above is not an error
> 
> nathan
> 
> -- 
> Nathan Sidwell    ::   http://www.codesourcery.com  
> ::     CodeSourcery LLC
> nathan@codesourcery.com    ::    
> http://www.planetfall.pwp.blueyonder.co.uk
> 
> 



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

  reply	other threads:[~2004-12-01 11:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-30 22:58 Assembly optimizations Klaus Winter
2004-12-01  9:21 ` Nathan Sidwell
2004-12-01  9:39   ` Is this a bug in gcc?? Name lastlong
2004-12-01 11:03     ` Nathan Sidwell
2004-12-01 11:55       ` Name lastlong [this message]
2004-12-01 13:30         ` Eljay Love-Jensen
2004-12-01 13:35           ` Name lastlong
2004-12-01 13:39         ` Nathan Sidwell
2004-12-01 15:09 Martin York

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041201115516.5861.qmail@web53208.mail.yahoo.com \
    --to=brew_pt@yahoo.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=nathan@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).