[Bug c++/21976] New: Incomplete types are not detected at template definition time

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Thu Jun 9 09:22:00 GMT 2005


Hello,

the following should probably be flagged as an error without requiring an 
instantiation of the template:

-------------------------------
struct A;

template <class> struct B {
  void foo(void) { A a; }
};
-------------------------------

GCC accepts the code without complaining.

-- 
           Summary: Incomplete types are not detected at template definition
                    time
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giovannibajo at libero dot it
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list