This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/4854: GCC 3.0.2 fails to flag ambiguous method definitions
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/4854: GCC 3.0.2 fails to flag ambiguous method definitions
- From: mkarras110 at yahoo dot com
- Date: 12 Nov 2001 06:55:39 -0000
- Reply-to: mkarras110 at yahoo dot com
>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: