aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2018-04-05 04:26:36 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2018-04-05 04:26:36 +0000
commit44780b91eb61d1a4ae3a6f94300d1b97a1d06557 (patch)
tree06ddb1def51912f29c6d94f008bbdf5cc0ed872b /gcc/expr.c
parentda0c8d9793df1083a21628efdb6368174d2d78d4 (diff)
downloadgcc-44780b91eb61d1a4ae3a6f94300d1b97a1d06557.zip
gcc-44780b91eb61d1a4ae3a6f94300d1b97a1d06557.tar.gz
gcc-44780b91eb61d1a4ae3a6f94300d1b97a1d06557.tar.bz2
[PR c++/84979] reject auto in explicit tmpl args for tmpl-fn
With concepts, we accept auto in explicit template arguments, but we should only accept them for template classes. Passing them to template functions or variables is not allowed. So, reject it, at parse time if possible, at specialization time otherwise. for gcc/cp/ChangeLog PR c++/84979 * pt.c (check_auto_in_tmpl_args): New. (tsubst_qualified_id): Use it to reject template args referencing auto for non-type templates. * parser.c (cp_parser_template_id): Likewise. * cp-tree.h (check_auto_in_tmpl_args): Declare. * typeck2.c (build_functional_cast): Report correct location for invalid use of auto. for gcc/testsuite/ChangeLog PR c++/84979 * g++.dg/concepts/pr84979.C: New. * g++.dg/concepts/pr84979-2.C: New. * g++.dg/concepts/pr84979-3.C: New. From-SVN: r259124
Diffstat (limited to 'gcc/expr.c')
0 files changed, 0 insertions, 0 deletions