[Bug c++/11764] New: g++ does not treat injected class name correctly.

gdr at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Aug 1 17:00:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: g++ does not treat injected class name correctly.
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gdr at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: all
  GCC host triplet: all
GCC target triplet: all

cc1plus does not implement the class name injection correctly.
In particular the snipped below should be rejected on the basis that
A::A does not name a type (it designates a constructor)

  struct A { };

  int main()
  {
     A::A a;       // should be an ERROR
  }



More information about the Gcc-bugs mailing list