aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-01-02 15:54:42 -0500
committerJason Merrill <jason@gcc.gnu.org>2013-01-02 15:54:42 -0500
commit3a322efd85d2697724a6e759c9a53f14a3aac6b6 (patch)
tree21b9434b748aaea0aa69dc381ca7ee4695a7079b /gcc/cp/call.c
parent3fd005a68979c83df0fc9024b98a364cb3fb32dc (diff)
downloadgcc-3a322efd85d2697724a6e759c9a53f14a3aac6b6.zip
gcc-3a322efd85d2697724a6e759c9a53f14a3aac6b6.tar.gz
gcc-3a322efd85d2697724a6e759c9a53f14a3aac6b6.tar.bz2
re PR c++/54325 (C++11 uniform initialization syntax for argument-less abstract base class constructor fails)
PR c++/54325 * call.c (build_new_method_call_1): Don't use build_value_init for user-provided default constructors. From-SVN: r194820
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index bba5d9f..ad39637 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -7534,6 +7534,9 @@ build_new_method_call_1 (tree instance, tree fns, vec<tree, va_gc> **args,
build_special_member_call. */
if (CONSTRUCTOR_NELTS (init_list) == 0
&& TYPE_HAS_DEFAULT_CONSTRUCTOR (basetype)
+ /* For a user-provided default constructor, use the normal
+ mechanisms so that protected access works. */
+ && !type_has_user_provided_default_constructor (basetype)
&& !processing_template_decl)
init = build_value_init (basetype, complain);