From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7234 invoked by alias); 4 Dec 2002 12:26:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7220 invoked by uid 71); 4 Dec 2002 12:26:03 -0000 Date: Wed, 04 Dec 2002 04:26:00 -0000 Message-ID: <20021204122603.7219.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Petter Reinholdtsen Subject: Re: c/8754: Allows illegal code Reply-To: Petter Reinholdtsen X-SW-Source: 2002-12/txt/msg00189.txt.bz2 List-Id: The following reply was made to PR c/8754; it has been noted by GNATS. From: Petter Reinholdtsen To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: Subject: Re: c/8754: Allows illegal code Date: 04 Dec 2002 13:21:18 +0100 [Volker Reichelt] > This is not overloading. You can do the following (which is also > accepted by SGI's compiler): > > int main() > { > double main=3; > return main; > } > > In your case the identifier main inside the outer function main is a > function, not a double. That's the only difference. OK. So GCC is not an ANSI C compiler by default. I would like it to be, but I realise the GCC developers do not want that at the moment. Could I request a warning by default in the case above, about the variable (or local function) hiding the symbol for the current function?