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++/25999] New: compiler loses extern "C" for function after #pragma weak


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


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