/cp
2019-08-06 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (check_array_designated_initializer): Use
cp_expr_loc_or_input_loc in one place.
/testsuite
2019-08-06 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp0x/desig1.C: Check location too.
From-SVN: r274141
+2019-08-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl.c (check_array_designated_initializer): Use
+ cp_expr_loc_or_input_loc in one place.
+
2019-08-06 Jakub Jelinek <jakub@redhat.com>
* parser.c (cp_parser_omp_for_loop): For OMP_LOOP, ignore parallel
sorry ("non-trivial designated initializers not supported");
}
else
- error ("C99 designator %qE is not an integral constant-expression",
- ce->index);
+ error_at (cp_expr_loc_or_input_loc (ce->index),
+ "C99 designator %qE is not an integral constant-expression",
+ ce->index);
return false;
}
+2019-08-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/desig1.C: Check location too.
+
2019-08-05 Marek Polacek <polacek@redhat.com>
DR 2413 - typename in conversion-function-ids.
constexpr operator SE() const { return SE::se0; }
};
-int c[] = { [C()] = 0 }; // { dg-error "integral constant-expression" }
+int c[] = { [C()] = 0 }; // { dg-error "14:C99 designator .C\\\(\\\). is not an integral constant-expression" }
// { dg-warning "does not allow C99 designated initializers" "" { target *-*-* } .-1 }