public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19732] New: [4.0 regression] Invalid destructor declarations accepted
@ 2005-01-31 23:10 reichelt at gcc dot gnu dot org
  2005-02-01  0:01 ` [Bug c++/19732] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-01-31 23:10 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet is accepted by mainline:

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

Mark, this was caused by your patch
http://gcc.gnu.org/ml/gcc-cvs/2004-06/msg00888.html

This patch not only removed the error message
  error ("destructor `%T' must match class name `%T'", name, rename);
for destructors from grokdeclarator, but also
  error ("destructors must be member functions");

A testcase that used to trigger the second error message but is now accepted
is the following:

==================================
struct A;
void ~A();
==================================

-- 
           Summary: [4.0 regression] Invalid destructor declarations
                    accepted
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, monitored
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-02-10  0:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-31 23:10 [Bug c++/19732] New: [4.0 regression] Invalid destructor declarations accepted reichelt at gcc dot gnu dot org
2005-02-01  0:01 ` [Bug c++/19732] " pinskia at gcc dot gnu dot org
2005-02-09 11:17 ` mmitchel at gcc dot gnu dot org
2005-02-10  6:28 ` cvs-commit at gcc dot gnu dot org
2005-02-10  8:16 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).