[Bug c++/13699] Extern "C" routine in different namespaces is not the same entity

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Thu Jan 15 15:29:00 GMT 2004


------- Additional Comments From bangerth at dealii dot org  2004-01-15 15:29 -------
Confirmed. 
 
The compiler treats the two declarations as the same function, though. 
This is evidenced by this program: 
--------------------- 
namespace A { 
  extern "C" void foo() throw(); 
  void f() { foo(); } 
} 
extern "C" void foo(); 
void f() { foo(); } 
--------------------- 
Both versions of f() should call the same function foo, and they 
indeed do if one looks at the assembler output. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |accepts-invalid
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-15 15:29:52
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13699



More information about the Gcc-bugs mailing list