PR c++/91673 - ICE with noexcept in alias-declaration.
authorMarek Polacek <polacek@redhat.com>
Tue, 10 Sep 2019 23:22:37 +0000 (23:22 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 10 Sep 2019 23:22:37 +0000 (23:22 +0000)
commit480c18e16fd69998266850b804024a7559f1bc70
tree04ea0ec010a6b86907503414d1c6839a48d20fbb
parentd85569f63db86e656ecb79b81c74a906f27bf509
PR c++/91673 - ICE with noexcept in alias-declaration.

* parser.c (CP_PARSER_FLAGS_DELAY_NOEXCEPT): New parser flag.
(cp_parser_lambda_declarator_opt): Pass CP_PARSER_FLAGS_NONE to
cp_parser_exception_specification_opt.
(cp_parser_direct_declarator): Adjust a call to
cp_parser_exception_specification_opt.
(cp_parser_member_declaration): Pass CP_PARSER_FLAGS_DELAY_NOEXCEPT
to cp_parser_declarator if not processing a friend or typedef
declaration.
(cp_parser_late_noexcept_specifier): Adjust a call to
cp_parser_noexcept_specification_opt.
(cp_parser_noexcept_specification_opt): New parameter for parser flags,
drop the FRIEND_P parameter.  Use the new parameter.
(cp_parser_exception_specification_opt): Likewise.
(cp_parser_transaction): Adjust a call to
cp_parser_noexcept_specification_opt.
(cp_parser_transaction_expression): Likewise.

* g++.dg/cpp1z/using7.C: New test.
* g++.dg/cpp1z/using8.C: New test.

From-SVN: r275617
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/using7.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/using8.C [new file with mode: 0644]