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++/44571] New: Indirect namespace composition fails on standard C functions


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


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