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

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

  reply	other threads:[~2004-12-01 11:03 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 [this message]
2004-12-01 11:55       ` Name lastlong
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=41ADA4DE.9060002@codesourcery.com \
    --to=nathan@codesourcery.com \
    --cc=brew_pt@yahoo.com \
    --cc=gcc-help@gcc.gnu.org \
    /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).