summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/cp/pt.c')
-rw-r--r--contrib/gcc/cp/pt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/gcc/cp/pt.c b/contrib/gcc/cp/pt.c
index 8fc9f74..b8e9545 100644
--- a/contrib/gcc/cp/pt.c
+++ b/contrib/gcc/cp/pt.c
@@ -3430,6 +3430,16 @@ convert_template_argument (parm, arg, args, complain, i, in_decl)
val, t);
return error_mark_node;
}
+
+ /* In order to avoid all sorts of complications, we do
+ not allow variably-modified types as template
+ arguments. */
+ if (variably_modified_type_p (val))
+ {
+ error ("template-argument `%T' is a variably modified type",
+ val);
+ return error_mark_node;
+ }
}
}
}
OpenPOWER on IntegriCloud