c++/2022: Internal compiler error when c function has same name as mangled C++ name
adam@thejenkins.org
adam@thejenkins.org
Sun Feb 18 16:26:00 GMT 2001
>Number: 2022
>Category: c++
>Synopsis: Internal compiler error when c function has same name as mangled C++ name
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Sun Feb 18 16:26:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Adam Jenkins
>Release: gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>Organization:
>Environment:
i386-redhat-linux
Linux kernel version 2.2.12-20
Pentium 500
128 Megs RAM
>Description:
If there is an extern "C" function that has the same name as a mangled C++ function name, then the compiler crashes with an Internal compiler error 378.
For example, g++ mangles the function:
int func(int a, float b)
as follows: _func__Fif
If I then create a extern "C" function named "func__Fif" in the same program, the compiler crashes when trying to compile it.
>How-To-Repeat:
g++ -S tmp.cc
>Fix:
I guess it should just give an error message saying that an extern "C" function name conflicts with a mangled C++ function name. With just a compiler crash, it's very hard to figure out why it's crashing.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list