This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/3379: gcc 3.0 gives incomprehensible error using explicit __func__
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/3379: gcc 3.0 gives incomprehensible error using explicit __func__
- From: rogier dot goossens at cmg dot nl
- Date: 22 Jun 2001 18:50:40 -0000
- Reply-To: rogier dot goossens at cmg dot nl
>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: