public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59033] New: cannot control inherited constructors visibility
@ 2013-11-06 21:09 akim.demaille at gmail dot com
2013-11-07 9:50 ` [Bug c++/59033] cannot control inherited constructors access paolo.carlini at oracle dot com
2013-11-07 12:00 ` daniel.kruegler at googlemail dot com
0 siblings, 2 replies; 3+ messages in thread
From: akim.demaille at gmail dot com @ 2013-11-06 21:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59033
Bug ID: 59033
Summary: cannot control inherited constructors visibility
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: akim.demaille at gmail dot com
Hi,
Again, I have found no clear wording in the draft of the standard that I have,
however, consistency in the language would expect that "using" to import
constructors should provide them with the _current_ public/protected/private
visibility, not the one of the original constructor.
The following example shows that the "using" on types and "using" on
constructors are not treated the same way.
akim@padam /tmp $ cat foo.cc
struct base
{
protected:
using type = int;
base(type, type) {}
};
struct derived: public base
{
public:
using base::base;
using base::type;
};
int main()
{
derived::type i;
derived b(i,i);
}
akim@padam /tmp $ g++-mp-4.9 -Wall -std=c++11 foo.cc
foo.cc: In function 'int main()':
foo.cc:11:15: error: 'derived::derived(base::type, base::type)' is protected
using base::base;
^
foo.cc:18:16: error: within this context
derived b(i,i);
^
akim@padam /tmp $ g++-mp-4.9 --version
g++-mp-4.9 (MacPorts gcc49 4.9-20130915_0) 4.9.0 20130915 (experimental)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Same with 4.8.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/59033] cannot control inherited constructors access
2013-11-06 21:09 [Bug c++/59033] New: cannot control inherited constructors visibility akim.demaille at gmail dot com
@ 2013-11-07 9:50 ` paolo.carlini at oracle dot com
2013-11-07 12:00 ` daniel.kruegler at googlemail dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-07 9:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59033
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|cannot control inherited |cannot control inherited
|constructors visibility |constructors access
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
visibility is a term of art
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/59033] cannot control inherited constructors access
2013-11-06 21:09 [Bug c++/59033] New: cannot control inherited constructors visibility akim.demaille at gmail dot com
2013-11-07 9:50 ` [Bug c++/59033] cannot control inherited constructors access paolo.carlini at oracle dot com
@ 2013-11-07 12:00 ` daniel.kruegler at googlemail dot com
1 sibling, 0 replies; 3+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2013-11-07 12:00 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 3321 bytes --]
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59033
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
The wording in the standard is pretty clear (12.9 p4):
"A constructor so declared has the same access as the corresponding constructor
in X."
The gcc compiler (and clang as well) both behave according to this
specification.
A using declaration for a type is different: There can not be two (or more)
types of the same name within such a using declaration.
>From gcc-bugs-return-433828-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 07 12:04:53 2013
Return-Path: <gcc-bugs-return-433828-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7458 invoked by alias); 7 Nov 2013 12:04:53 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7395 invoked by uid 55); 7 Nov 2013 12:04:49 -0000
From: "ygribov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/59029] ICE with builtin function and -fsanitizedress
Date: Thu, 07 Nov 2013 12:04:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ygribov at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59029-4-t9DaAYJjMq@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59029-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59029-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg00605.txt.bz2
Content-length: 677
http://gcc.gnu.org/bugzilla/show_bug.cgi?idY029
--- Comment #4 from ygribov at gcc dot gnu.org ---
Author: ygribov
Date: Thu Nov 7 12:04:45 2013
New Revision: 204508
URL: http://gcc.gnu.org/viewcvs?rev 4508&root=gcc&view=rev
Log:
Allow integer literals as addresses in instrumented builtins.
gcc/
PR sanitizer/59029
* gcc/asan.c (get_mem_refs_of_builtin_call): Allow
integer literals as addresses in instrumented builtins.
gcc-testsuite/
PR sanitizer/59029
* c-c++-common/asan/pr59029.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/asan/pr59029.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/asan.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-07 12:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-06 21:09 [Bug c++/59033] New: cannot control inherited constructors visibility akim.demaille at gmail dot com
2013-11-07 9:50 ` [Bug c++/59033] cannot control inherited constructors access paolo.carlini at oracle dot com
2013-11-07 12:00 ` daniel.kruegler at googlemail dot com
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).