[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / Woverlength-strings-pedantic-c89-asm.c
blob45373bc1a984e7ca9002fcab716cc6921df6f75a
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 " "
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 __asm__ (HUN HUN HUN HUN HUN TEN);
14 /* C99's minimum-maximum is 4095. */
15 __asm__ (
16 THO THO THO THO /* 4000 */
17 TEN TEN TEN TEN TEN /* 4050 */
18 TEN TEN TEN TEN /* 4090 */
19 "123456");
21 void
22 f (void)
24 /* C89's minimum-maximum is 509. */
25 __asm__ (HUN HUN HUN HUN HUN TEN);
26 __asm__ (HUN HUN HUN HUN HUN TEN : : );
27 __asm__ goto (HUN HUN HUN HUN HUN TEN : : : : label);
29 /* C99's minimum-maximum is 4095. */
30 __asm__ (
31 THO THO THO THO /* 4000 */
32 TEN TEN TEN TEN TEN /* 4050 */
33 TEN TEN TEN TEN /* 4090 */
34 "123456");
35 __asm__ (
36 THO THO THO THO /* 4000 */
37 TEN TEN TEN TEN TEN /* 4050 */
38 TEN TEN TEN TEN /* 4090 */
39 "123456" : : );
40 __asm__ goto (
41 THO THO THO THO /* 4000 */
42 TEN TEN TEN TEN TEN /* 4050 */
43 TEN TEN TEN TEN /* 4090 */
44 "123456" : : : : label);
46 label: ;