public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: pietzowski@byterider.biz To: gcc-gnats@gcc.gnu.org Subject: c++/6373: Reimplementation of virtual functions in the same class works (should normally not)gcc version 2.95.3 20010315 (SuSE) Date: Fri, 19 Apr 2002 06:26:00 -0000 [thread overview] Message-ID: <20020419132145.31666.qmail@sources.redhat.com> (raw) >Number: 6373 >Category: c++ >Synopsis: Reimplementation of virtual functions in the same class works (should normally not)gcc version 2.95.3 20010315 (SuSE) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Apr 19 06:26:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Andreas Pietzowski >Release: gcc version 2.95.3 20010315 (SuSE) >Organization: >Environment: SuSE-Linux 8.0 >Description: Hi, I program code for KDE with Qt under Linux. Qt has e.g a class QTable and in there they implemented this method virtual void QTable::activateNextCell(){ // some code here } Now it is possible that I write in my code: void QTable::activateNextCell(){ // some other code } and my reimplementation compiles and is used by the executable. Under Windows with Borlans bcc it isn't used. The guys from Trolltech (the founders of Qt) told me I should report this behaviour to you because a compiler should never allow a reimplementation of a method of the same class (only if you create a sub-class). Could you follow me? Was it enough info? If not please contact me via email and I'll try to explain it more detailed. >How-To-Repeat: >Fix: A warning would be enough I think because the behavior of a compiler is not defined in that case I think. And prehaps don't use the reimplemented code because there is already an original implementation. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-04-19 13:26 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-04-19 6:26 pietzowski [this message] 2002-04-22 14:19 rodrigc 2002-12-06 15:07 reichelt
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=20020419132145.31666.qmail@sources.redhat.com \ --to=pietzowski@byterider.biz \ --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).