If I compile the following piece of code with g++ -c, and examine the resulting object file, it references symbols "myfoo" and "bar", so the second pragma failed because of the namespace.
extern "C" { #pragma redefine_extname foo myfoo void foo(double); namespace A { #pragma redefine_extname bar mybar void bar(double); } } void f(double x){foo(x);A::bar(x);} A relevant example is wcsftime when __cplusplus is 199711L. -- Summary: pragma redefine_extname fails when namespaces are involved Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: marc dot glisse at normalesup dot org GCC host triplet: i386-pc-solaris2.10 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30112