* 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
34 lines
729 B
C
34 lines
729 B
C
// PR c++/91673 - ICE with noexcept in alias-declaration.
|
|
// { dg-do compile { target c++17 } }
|
|
|
|
template<typename T, bool B>
|
|
using U1 = T() noexcept(B);
|
|
|
|
template<bool B>
|
|
struct S {
|
|
int I;
|
|
static constexpr bool b = true;
|
|
|
|
template<typename T>
|
|
using U2 = T() noexcept(B);
|
|
|
|
template<typename T>
|
|
using U8 = T() noexcept(b);
|
|
|
|
template<typename T>
|
|
using U10 = T(int p) noexcept(noexcept(p));
|
|
|
|
template<typename T, bool B2>
|
|
using U11 = T() noexcept(B2);
|
|
|
|
using U3 = void() noexcept(B);
|
|
using U9 = void() noexcept(b);
|
|
using U4 = void() noexcept(noexcept (I));
|
|
using U5 = void(int p) noexcept(noexcept(p));
|
|
|
|
typedef void(*T1)() noexcept(B);
|
|
typedef void(*T2)(int p) noexcept(noexcept(p));
|
|
};
|
|
|
|
S<true> s;
|