[Bug c++/44571] New: Indirect namespace composition fails on standard C functions

Ken dot Joyner at Actel dot com gcc-bugzilla@gcc.gnu.org
Thu Jun 17 18:46:00 GMT 2010


The code below complains that strcmp is not a member of std. It does not
complain about the function strcmp_1. 

The same code compiled correction on gcc 4.1.2.

This was compiled with gcc -c. 


extern int strcmp( const char* s, const char* s2 );
extern int strcmp_1( const char* s, const char* s2 );

namespace my_ns
{
  using ::strcmp;
  using ::strcmp_1;
};

namespace std
{
  using namespace my_ns;

};

int main( int argc, char** argv )
{
  std::strcmp( "1", "2" );
  std::strcmp_1( "1", "2" );

  return 0;
};


-- 
           Summary: Indirect namespace composition fails on standard C
                    functions
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Ken dot Joyner at Actel dot com
 GCC build triplet: RHEL 4
  GCC host triplet: RHEL 4
GCC target triplet: RHEL 4


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



More information about the Gcc-bugs mailing list