GCC accept test1.cc. But GCC reject test2.cc.
IMHO, this code is valid. 

test1.cc:
struct foo
{
  ~foo(){}
  int foo;
};

test2.cc:
struct foo
{
  int foo;
  ~foo(){}
};


-- 
           Summary: Member with same name as class
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: s__nakayama at infoseek dot jp


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

Reply via email to