re PR c++/84423 ([concepts] ICE with invalid using declaration)
commit5abdb369eb2f38272bb8ee2ea0488194942c7cff
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 9 Oct 2018 21:16:09 +0000 (9 21:16 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 9 Oct 2018 21:16:09 +0000 (9 21:16 +0000)
treeadcae0bb82ca3dd8623043c53ce73c8537089aed
parent2f039722d079d4f6cc060e3b9da0e9ba39d65478
re PR c++/84423 ([concepts] ICE with invalid using declaration)

/cp
2018-10-09  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/84423
* pt.c (convert_template_argument): Immediately return error_mark_node
if the second argument is erroneous.
* parser.c (cp_parser_type_id): Add location_t * parameter.
(cp_parser_type_id_1): Likewise.
(cp_parser_alias_declaration): Adjust cp_parser_type_id call,
obtain the location of the type and save it.
(cp_parser_template_type_arg): Adjust.
(cp_parser_trailing_type_id): Likewise.
* decl.c (grokdeclarator): Improve error message for 'auto' in
alias declaration.

/testsuite
2018-10-09  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/84423
* g++.dg/concepts/pr84423-1.C: New.
* g++.dg/concepts/pr84423-2.C: Likewise.
* g++.dg/cpp0x/auto39.C: Test location too.
* g++.dg/cpp0x/auto9.C: Likewise.
* g++.dg/cpp1y/pr60384.C: Likewise.

From-SVN: r264996
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/concepts/pr84423-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/concepts/pr84423-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/auto39.C
gcc/testsuite/g++.dg/cpp0x/auto9.C
gcc/testsuite/g++.dg/cpp1y/pr60384.C