Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / Woverlength-strings-pedantic-c89-ext.c
blob09b8079d5535519bffaff491914e78123b68078b
1 /* -Woverlength-strings complains about string constants which are too long
2 for the C standard's "minimum maximum" limits. It is off by default,
3 but implied by -pedantic. */
5 /* { dg-options "-std=c89 -pedantic" } */
7 #define TEN "xxxxxxxxxx"
8 #define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN
9 #define THO HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN
11 /* C89's minimum-maximum is 509. */
12 const char x510[] = __extension__ HUN HUN HUN HUN HUN TEN;
14 /* C99's minimum-maximum is 4095. */
15 const char x4096[] = __extension__
16 THO THO THO THO /* 4000 */
17 TEN TEN TEN TEN TEN /* 4050 */
18 TEN TEN TEN TEN /* 4090 */
19 "123456";