public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14339] New: Bogus extra error message after redefinition of member function
@ 2004-02-29  1:56 olly at survex dot com
  2004-02-29  2:01 ` [Bug c++/14339] [3.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: olly at survex dot com @ 2004-02-29  1:56 UTC (permalink / raw)
  To: gcc-bugs

$ cat gccbug.cc 
class A {
    public:
    A() {}
    int foo(int);
};

int A::foo(int x) { return x; }
int A::foo(int x) { return x + 1; }
$ g++ -c gccbug.cc
gccbug.cc:8: error: redefinition of `int A::foo(int)'
gccbug.cc:7: error: `int A::foo(int)' previously defined here
gccbug.cc:8: error: no `int A::foo(int)' member function declared in class `A'
$

The last error line is bogus as that method *is* declared in class A.  This
extra error message is largely cosmetic, though perhaps it might confuse some
people.

This error also occurs with GCC 3.2.3, but not with 2.95, so technically it's
a regression...

-- 
           Summary: Bogus extra error message after redefinition of member
                    function
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: olly at survex dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2004-04-18 19:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-29  1:56 [Bug c++/14339] New: Bogus extra error message after redefinition of member function olly at survex dot com
2004-02-29  2:01 ` [Bug c++/14339] [3.3 Regression] " pinskia at gcc dot gnu dot org
2004-04-18 19:38 ` gdr at gcc dot gnu dot org
2004-04-18 21:13 ` olly at survex dot com

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).