[Bug c++/28606] New: [4.0/4.1/4.2] Destructor accepted as return-type of constructor

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Aug 4 20:26:00 GMT 2006


The following invalid code snippet is accepted since GCC 4.0.0:

================
struct A
{
  ~A A();
};
================

Even worse, the following code snippet is accepted, too:

================
struct B;

struct A
{
  A::~B A();
};
================

Posting a patch soon.


-- 
           Summary: [4.0/4.1/4.2] Destructor accepted as return-type of
                    constructor
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: reichelt at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list