public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: aaron@isotton.com To: gcc-gnats@gcc.gnu.org Subject: c++/7224: g++ 3.x does not tecognize unused ambiguous inline member functions Date: Sat, 06 Jul 2002 11:56:00 -0000 [thread overview] Message-ID: <20020706184558.1468.qmail@sources.redhat.com> (raw) >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:
next reply other threads:[~2002-07-06 18:56 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-07-06 11:56 aaron [this message] 2002-07-11 8:31 lerdsuwa 2002-07-11 9:26 mmitchel 2002-07-11 15:36 mmitchel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020706184558.1468.qmail@sources.redhat.com \ --to=aaron@isotton.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).