aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/pt.c10
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 49ca2f2..04e1426 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2016-03-01 Patrick Palka <ppalka@gcc.gnu.org>
+
+ PR c++/68948
+ PR c++/69961
+ * pt.c (tsubst_baselink): Reinstate the check for an invalid
+ constructor call.
+
2016-02-28 Jason Merrill <jason@redhat.com>
PR c++/69995
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index b5855a8..b3681be 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -13622,7 +13622,15 @@ tsubst_baselink (tree baselink, tree object_type,
name = mangle_conv_op_name_for_type (optype);
baselink = lookup_fnfields (qualifying_scope, name, /*protect=*/1);
if (!baselink)
- return error_mark_node;
+ {
+ if (constructor_name_p (name, qualifying_scope))
+ {
+ if (complain & tf_error)
+ error ("cannot call constructor %<%T::%D%> directly",
+ qualifying_scope, name);
+ }
+ return error_mark_node;
+ }
/* If lookup found a single function, mark it as used at this
point. (If it lookup found multiple functions the one selected