1 /* { dg-do compile } */ 2 /* { dg-options "-std=c99 -pedantic" } */ 3 4 /* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma. 5 C99 6.4.4.2a (New). 6 7 Check that there is a pedantic warning for the use of pragma 8 STD FLOAT_CONST_DECIMAL64. */ 9 10 double a; 11 f1(void)12void f1 (void) 13 { 14 #pragma STDC FLOAT_CONST_DECIMAL64 ON /* { dg-warning "ISO C" } */ 15 a = 1.0; 16 } 17 f2(void)18void f2 (void) 19 { 20 #pragma STDC FLOAT_CONST_DECIMAL64 OFF /* { dg-warning "ISO C" } */ 21 a = 2.0; 22 } 23 f3(void)24void f3 (void) 25 { 26 #pragma STDC FLOAT_CONST_DECIMAL64 DEFAULT /* { dg-warning "ISO C" } */ 27 a = 3.0; 28 } 29 f4(void)30void f4 (void) 31 { 32 _Pragma ("STDC FLOAT_CONST_DECIMAL64 ON") /* { dg-warning "ISO C" } */ 33 a = 1.0; 34 } 35 f5(void)36void f5 (void) 37 { 38 _Pragma ("STDC FLOAT_CONST_DECIMAL64 OFF") /* { dg-warning "ISO C" } */ 39 a = 2.0; 40 } 41 f6(void)42void f6 (void) 43 { 44 _Pragma ("STDC FLOAT_CONST_DECIMAL64 DEFAULT") /* { dg-warning "ISO C" } */ 45 a = 3.0; 46 } 47