This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37266] New: extra #pragma weak breaks function aliasing
- From: "Petr dot Salinger at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Aug 2008 13:38:40 -0000
- Subject: [Bug c/37266] New: extra #pragma weak breaks function aliasing
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The extra line "#pragma weak __foo" breaks function aliasing.
For the code bellow, the compiler emits warning "asm declaration ignored due to
conflict with previous rename", in fact it really ignores asm declaration.
Without "#pragma weak __foo", fce() calls __bar(), when it is included
it tries to call bar().
#pragma weak __foo
extern int bar (void);
extern int bar (void) __asm__ ("__bar");
int fce()
{
bar();
}
--
Summary: extra #pragma weak breaks function aliasing
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Petr dot Salinger at seznam dot cz
GCC host triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37266