cp_parser_parse_tentatively (parser);
/* Parse the dependent declarator. */
- declarator = cp_parser_declarator (parser, dcl_kind,
- CP_PARSER_FLAGS_NONE,
+ declarator = cp_parser_declarator (parser, dcl_kind, flags,
/*ctor_dtor_or_conv_p=*/NULL,
/*parenthesized_p=*/NULL,
- /*member_p=*/false,
- friend_p, /*static_p=*/false);
+ member_p, friend_p, static_p);
/* If we are parsing an abstract-declarator, we must handle the
case where the dependent declarator is absent. */
--- /dev/null
+// PR c++/100752
+// { dg-do compile { target c++11 } }
+
+struct S {
+ void f() noexcept {}
+ S &g() noexcept(noexcept(f())) { f(); return *this; }
+};
+
+struct X {
+ int& f() noexcept(noexcept(i));
+ int i;
+};
// Test that the parser doesn't go into an infinite loop from ignoring the
// PRE_PARSED_FUNCTION_DECL token.
-class C { static void* operator new(size_t); }; // { dg-error "24:declaration of .operator new. as non-function" }
-// { dg-error "expected|ISO C\\+\\+ forbids" "" { target *-*-* } .-1 }
+class C { static void* operator new(size_t); }; // { dg-error "37:.size_t. has not been declared" }
+// { dg-error ".operator new. takes type .size_t." "" { target *-*-* } .-1 }
void* C::operator new(size_t) { return 0; } // { dg-error "" }
class D { D(int i): integer(i){}}; // { dg-error "" }