This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25999] New: compiler loses extern "C" for function after #pragma weak
- From: "metcalf at lcs dot mit dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jan 2006 20:04:48 -0000
- Subject: [Bug c++/25999] New: compiler loses extern "C" for function after #pragma weak
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following short program generates the mangled symbol "_Z3Foov" instead of
the expected "Foo" when built with -DBUG. Without -DBUG and the "#pragma weak
Random_Symbol" line, or if using g++ 3.2.3, the expected thing happens.
extern "C" {
void Foo();
}
#ifdef BUG
#pragma weak Random_Symbol
#endif
void Foo() { }
--
Summary: compiler loses extern "C" for function after #pragma
weak
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: metcalf at lcs dot mit dot edu
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25999