Implement C _FloatN, _FloatNx types.
[official-gcc.git] / gcc / testsuite / gcc.dg / init-excess-2.c
blob0e91b60950b3daa421a612a57ab5f7247caa79a7
1 /* Test for diagnostics about excess initializers when using a macro
2 defined in a system header:
3 c/71115 - Missing warning: excess elements in struct initializer. */
4 /* { dg-do compile } */
5 /* { dg-options "" } */
6 /* { dg-require-effective-target int32plus } */
8 #include <stddef.h>
10 int* a[1] = {
12 NULL /* { dg-warning "excess elements|near init" } */
15 const char str[1] = {
17 NULL /* { dg-warning "excess elements|near init" } */
20 struct S {
21 int *a;
22 } s = {
24 NULL /* { dg-warning "excess elements|near init" } */
27 struct __attribute__ ((designated_init)) S2 {
28 int *a;
29 } s2 = {
30 NULL /* { dg-warning "positional initialization|near init" } */
33 union U {
34 int *a;
35 } u = {
37 NULL /* { dg-warning "excess elements|near init" } */
40 int __attribute__ ((vector_size (16))) ivec = {
41 0, 0, 0, 0,
42 NULL /* { dg-warning "excess elements|near init" } */
45 int* scal = {
47 NULL /* { dg-warning "excess elements|near init" } */