PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / dfp / pragma-float-const-decimal64-5.c
blob75e9525dda02969a4e83f80d0647fc9e83b33ae6
1 /* { dg-do compile } */
2 /* { dg-options "-std=c99 -pedantic" } */
4 /* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma.
5 C99 6.4.4.2a (New).
7 Check that there is a pedantic warning for the use of pragma
8 STD FLOAT_CONST_DECIMAL64. */
10 double a;
12 void f1 (void)
14 #pragma STDC FLOAT_CONST_DECIMAL64 ON /* { dg-warning "ISO C" } */
15 a = 1.0;
18 void f2 (void)
20 #pragma STDC FLOAT_CONST_DECIMAL64 OFF /* { dg-warning "ISO C" } */
21 a = 2.0;
24 void f3 (void)
26 #pragma STDC FLOAT_CONST_DECIMAL64 DEFAULT /* { dg-warning "ISO C" } */
27 a = 3.0;
30 void f4 (void)
32 _Pragma ("STDC FLOAT_CONST_DECIMAL64 ON") /* { dg-warning "ISO C" } */
33 a = 1.0;
36 void f5 (void)
38 _Pragma ("STDC FLOAT_CONST_DECIMAL64 OFF") /* { dg-warning "ISO C" } */
39 a = 2.0;
42 void f6 (void)
44 _Pragma ("STDC FLOAT_CONST_DECIMAL64 DEFAULT") /* { dg-warning "ISO C" } */
45 a = 3.0;