This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/4854: GCC 3.0.2 fails to flag ambiguous method definitions



>Number:         4854
>Category:       c++
>Synopsis:       GCC 3.0.2 fails to flag ambiguous method definitions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 11 22:56:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Michael Arras
>Release:        3.0.2
>Organization:
>Environment:
Linux 2.4 (i386)
>Description:
Gcc 3.0.2 (i686-pc-linux-gnu) has a quirk in which it does not
catch ambiguous method definitions.  If compiling class simple
(with -c), 3.0.2 will fail in the assembly stage, citing
"Error: Symbol xyzfuncEv already defined."  Inlining avoids
the quirk.

Gcc 2.96-MDK8.1 does the right thing by informing the user.


class simple
{
  public:
    void func();
    int func();
};

void simple::func() { }

int simple::func() { return 0; }


Michael Arras
mkarras110@yahoo.com
>How-To-Repeat:
g++ -c simple.cxx
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]