int flag_sanitize_save = flag_sanitize;
if (nested && !empty_ok)
flag_sanitize = 0;
- if (std_auto_type_p
- && c_parser_next_token_is (parser, CPP_OPEN_BRACE))
- {
- matching_braces braces;
- braces.consume_open (parser);
- init = c_parser_expr_no_commas (parser, NULL);
- if (c_parser_next_token_is (parser, CPP_COMMA))
- c_parser_consume_token (parser);
- braces.skip_until_found_close (parser);
- }
- else
- init = c_parser_expr_no_commas (parser, NULL);
+ init = c_parser_expr_no_commas (parser, NULL);
if (std_auto_type_p)
finish_underspecified_init (underspec_name,
underspec_state);
auto i = 1;
extern int i;
-static auto l = { 0L };
+static auto l = 0L;
extern long l;
extern auto const d = 0.0; /* { dg-warning "initialized and declared 'extern'" } */
extern const double d;
double dx;
auto ((i2)) = 3;
extern int i2;
-const auto i3 [[]] = { 4, };
+const auto i3 [[]] = 4;
extern int i4;
thread_local auto f = 1.0f;
float ff;
{
static int auto e10 = 3; /* { dg-error "multiple storage classes in declaration specifiers" } */
}
+
+void
+f6 ()
+{
+ static auto l = { 0L }; /* { dg-error "expected expression" } */
+ const auto i3 [[]] = { 4, }; /* { dg-error "expected expression" } */
+}