C++ PATCH to fix more FAILs in c++17/c++2a

Jason Merrill jason@redhat.com
Sat Sep 8 12:16:00 GMT 2018


On Fri, Sep 7, 2018 at 7:46 PM, Marek Polacek <polacek@redhat.com> wrote:
> +++ gcc/testsuite/c-c++-common/array-init.c
> @@ -2,3 +2,4 @@
>  /* { dg-prune-output "sorry, unimplemented: non-trivial designated initializers not supported" } */
>
>  char x[] = { [-1] = 1, 2, 3 }; /* { dg-error "array index in initializer exceeds array bounds" "" { target c } } */
> +// { dg-error "all initializer clauses should be designated" "" { target c++2a } .-1 }

This isn't an error we should check for, it's another effect of not
supporting array designators properly (PR87235).  Better to use
dg-prune-output.

OK with that change.

Jason



More information about the Gcc-patches mailing list