public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "harald at gigawatt dot nl" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/32039] Using declaration accepts non-visible members from base classes Date: Sat, 01 Mar 2014 00:03:00 -0000 [thread overview] Message-ID: <bug-32039-4-aLHOp43RrU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-32039-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32039 Harald van Dijk <harald at gigawatt dot nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |harald at gigawatt dot nl --- Comment #5 from Harald van Dijk <harald at gigawatt dot nl> --- This bug is about visibility, bug 19337 is about accessibility. I incorrectly used "visibility" in my comment on the other bug, I apologise if that has confused matters. The comments there do not apply here. Normally, a qualified name such as A::foo can be used to refer to a hidden member. In this instance, however, the standard makes a special exception, and states that A::foo must be visible in B as well, even though a qualified name is used, for the using declaration to be valid. In B, int A::foo(int) is hidden by int B::foo(long) because B's member function has the same name. (3.3.10p1) A name is said to be visible, if it is in scope, and not hidden. (3.3.10p5) So I think this bug report is valid and unrelated to 19337: A's member function is indeed not visible in any of the direct bases of C. Your comment (the "In the example above, A (from using A::foo) is visible" bit) suggests that you read the standard as requiring that the base class be visible, rather than the base class member.
next prev parent reply other threads:[~2014-03-01 0:03 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-32039-4@http.gcc.gnu.org/bugzilla/> 2011-11-22 8:51 ` fabien at gcc dot gnu.org 2014-02-28 21:41 ` fabien at gcc dot gnu.org 2014-02-28 21:43 ` fabien at gcc dot gnu.org 2014-02-28 21:53 ` fabien at gcc dot gnu.org 2014-03-01 0:03 ` harald at gigawatt dot nl [this message] 2014-03-01 7:53 ` fabien at gcc dot gnu.org 2015-01-10 16:46 ` ville.voutilainen at gmail dot com 2015-01-10 17:27 ` harald at gigawatt dot nl 2015-01-10 17:32 ` ville.voutilainen at gmail dot com 2015-01-10 18:12 ` ville.voutilainen at gmail dot com 2021-05-04 12:31 ` rguenth at gcc dot gnu.org 2007-05-22 12:07 [Bug c++/32039] New: " andrew dot stubbs at st dot com 2008-08-21 12:01 ` [Bug c++/32039] " gcc-bugzilla at contacts dot eelis dot net
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=bug-32039-4-aLHOp43RrU@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).