Consider this:

namespace mine
{
  int cpow;
};

int cabs;          // Ok
using mine::cpow;  // Not ok.

You see: correctly, cabs, doesn't conflict with the builtin cabs (because we
are using the form without __builtin_*). On the other hand, as soon as using
is involved, things are not ok. This is the *real* blocker of 21743, and we
cannot have a complete, consistent set of C99 complex builtins. When fixing
this bug, we should also check that the behavior of using is 100% correct
when *functions* are defined with the same name of builtins: I *think* it's
the case, but I'm not 100% sure.

-- 
           Summary: Using vs builtin names
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pcarlini at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 21743
             nThis:


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

Reply via email to