From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5099 invoked by alias); 6 Jul 2002 18:56:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 5075 invoked by uid 71); 6 Jul 2002 18:56:02 -0000 Resent-Date: 6 Jul 2002 18:56:02 -0000 Resent-Message-ID: <20020706185602.5073.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, aaron@isotton.com Received: (qmail 1470 invoked by uid 61); 6 Jul 2002 18:45:58 -0000 Message-Id: <20020706184558.1468.qmail@sources.redhat.com> Date: Sat, 06 Jul 2002 11:56:00 -0000 From: aaron@isotton.com Reply-To: aaron@isotton.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7224: g++ 3.x does not tecognize unused ambiguous inline member functions X-SW-Source: 2002-07/txt/msg00227.txt.bz2 List-Id: >Number: 7224 >Category: c++ >Synopsis: g++ 3.x does not tecognize unused ambiguous inline member functions >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Sat Jul 06 11:56:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Aaron Isotton >Release: gcc version 3.1.1 20020606 (Debian prerelease) >Organization: >Environment: i686 Linux 2.5.25 >Description: The following code compiles: struct foo { void bar() {} int bar() {return 0;} }; int main() {} It should generate an error as two functions differing only in their return value are not permitted. If the functions are not declared inline (i.e. outside the class) the assembler complains because the two functions have the same name; if the functions are used, a proper error message is emitted. The same happens with g++ 3.0; g++ 2.95 recognizes the problem and emits an error message. >How-To-Repeat: Compile this snippet with no compiler flags: struct foo { void bar() { } int bar() { return 0; } }; int main() {} >Fix: >Release-Note: >Audit-Trail: >Unformatted: