public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25635]  New: [4.0/4.1/4.2 regression] Bogus cruft in error message for invalid operator declaration
@ 2006-01-02 12:59 reichelt at gcc dot gnu dot org
  2006-01-02 16:49 ` [Bug c++/25635] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-01-02 12:59 UTC (permalink / raw)
  To: gcc-bugs

The diagnostic for the following invalid code snippet got worse with
GCC 4.0.0:

=============================================
struct A {};

A::operator int();
=============================================

We now issue a duplicate message and some more bogus stuff:

  bug.cc:3: error: no 'A::operator int()' member function declared in class 'A'
  bug.cc:3: error: no 'A::operator int()' member function declared in class 'A'
  bug.cc:3: error: 'A::operator int()' cannot be overloaded
  bug.cc:3: error: with 'A::operator int()'
  bug.cc:3: error: declaration of 'A::operator int()' outside of class is not
definition

We used to issue the following message which looks OK to me:

  bug.cc:3: error: no `A::operator int()' member function declared in class `A'
  bug.cc:3: error: declaration of `A::operator int()' outside of class is not
definition

For a normal member function like "void A::foo()" the error message is OK.


-- 
           Summary: [4.0/4.1/4.2 regression] Bogus cruft in error message
                    for invalid operator declaration
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: diagnostic, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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



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

end of thread, other threads:[~2006-07-19 10:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-02 12:59 [Bug c++/25635] New: [4.0/4.1/4.2 regression] Bogus cruft in error message for invalid operator declaration reichelt at gcc dot gnu dot org
2006-01-02 16:49 ` [Bug c++/25635] " pinskia at gcc dot gnu dot org
2006-01-03  0:43 ` mmitchel at gcc dot gnu dot org
2006-01-03  8:38 ` mmitchel at gcc dot gnu dot org
2006-01-03  8:40 ` mmitchel at gcc dot gnu dot org
2006-01-03  8:41 ` mmitchel at gcc dot gnu dot org
2006-01-03  8:46 ` mmitchel at gcc dot gnu dot org
2006-07-19 10:50 ` reichelt 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).