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]
Other format: [Raw text]

[Bug c/37266] New: extra #pragma weak breaks function aliasing


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


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