aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-05-23 16:14:01 -0400
committerJason Merrill <jason@gcc.gnu.org>2017-05-23 16:14:01 -0400
commitf0c1ade45a7488e97c8d6c3aababec5c9d04f609 (patch)
tree59a1364497c81860c16d0237d89f45ebbc6be599 /gcc/cp/decl2.c
parentf6744083c85b7b7469401ef9ce2e1014b7bf548f (diff)
downloadgcc-f0c1ade45a7488e97c8d6c3aababec5c9d04f609.zip
gcc-f0c1ade45a7488e97c8d6c3aababec5c9d04f609.tar.gz
gcc-f0c1ade45a7488e97c8d6c3aababec5c9d04f609.tar.bz2
PR c++/80396 - built-in for make_integer_sequence.
* pt.c (builtin_pack_fn_p, builtin_pack_call_p) (expand_integer_pack, expand_builtin_pack_call): New. (find_parameter_packs_r): Check builtin_pack_call_p. (check_for_bare_parameter_packs): Handle it. (tsubst_pack_expansion): Call expand_builtin_pack_call. (declare_integer_pack): New. (init_template_processing): Call it. * decl2.c (mark_used): Check builtin_pack_fn_p. From-SVN: r248384
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 7247b0f..85310e0 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -5109,6 +5109,13 @@ mark_used (tree decl, tsubst_flags_t complain)
if (!require_deduced_type (decl, complain))
return false;
+ if (builtin_pack_fn_p (decl))
+ {
+ error ("use of built-in parameter pack %qD outside of a template",
+ DECL_NAME (decl));
+ return false;
+ }
+
/* If we don't need a value, then we don't need to synthesize DECL. */
if (cp_unevaluated_operand || in_discarded_stmt)
return true;