From mboxrd@z Thu Jan 1 00:00:00 1970 From: rogier.goossens@cmg.nl To: gcc-gnats@gcc.gnu.org Subject: c/3379: gcc 3.0 gives incomprehensible error using explicit __func__ Date: Fri, 22 Jun 2001 11:56:00 -0000 Message-id: <20010622185040.14701.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00994.html List-Id: >Number: 3379 >Category: c >Synopsis: gcc 3.0 gives incomprehensible error using explicit __func__ >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Jun 22 11:56:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: rogier.goossens@cmg.nl >Release: gcc 3.0 >Organization: >Environment: alphaev56-dec-osf4.0d >Description: When compiling code that explicitly declares a (const char []) variable named __func__, gcc complains about being confused by 'earlier' errors, and quits. Needless to say it does not report any earlier errors. (see instructions for repeating) >How-To-Repeat: Compiling the following code: void myfun(void) { const char __func__[] = "myfun"; } Generates (just) the following diagnostic: try.24.c: In function `myfun': try.24.c:2: confused by earlier errors, bailing out >Fix: One fix is of course not to declare variables named __func__. There may be others ? >Release-Note: >Audit-Trail: >Unformatted: