This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/3379: gcc 3.0 gives incomprehensible error using explicit __func__



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]