Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/Woverride-init-3.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Test for warnings for overriding designated initializers: not | |
2 warned for with -Wextra -Wno-override-init. Bug 24010. */ | |
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */ | |
4 /* { dg-do compile } */ | |
5 /* { dg-options "-Wextra -Wno-override-init" } */ | |
6 | |
7 struct s { int a; int b; int c; }; | |
8 union u { char a; long long b; }; | |
9 | |
10 struct s s0 = { | |
11 .a = 1, | |
12 .b = 2, | |
13 .a = 3, | |
14 4, | |
15 5 | |
16 }; | |
17 | |
18 union u u0 = { | |
19 .a = 1, | |
20 .b = 2, | |
21 .a = 3 | |
22 }; | |
23 | |
24 int a[5] = { | |
25 [0] = 1, | |
26 [1] = 2, | |
27 [0] = 3, | |
28 [2] = 4 | |
29 }; |