* fold-const.c (fold) [EQ_EXPR]: Place both integer and real
[official-gcc.git] / gcc / testsuite / gcc.dg / wtr-suffix-1.c
blobf6b6300ac1f9558a07f4d50722ecffb0afac197a
1 /* Test for -Wtraditional warnings on integer constant suffixes.
2 Note, gcc should omit these warnings in system header files.
3 Origin: Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8/24/2000. */
4 /* { dg-do compile } */
5 /* { dg-options "-Wtraditional" } */
7 void
8 testfunc (void)
10 int i;
11 double f;
13 i = 1L;
14 i = 1l;
15 i = 1U; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
16 i = 1u; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
17 f = 1.0;
18 f = 1.0F; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
19 f = 1.0f; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
20 f = 1.0L; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
21 f = 1.0l; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
23 # 24 "sys-header.h" 3
24 /* We are in system headers now, no -Wtraditional warnings should issue. */
26 i = 1L;
27 i = 1l;
28 i = 1U;
29 i = 1u;
30 f = 1.0;
31 f = 1.0F;
32 f = 1.0f;
33 f = 1.0L;
34 f = 1.0l;