OSDN Git Service

PR c/17844
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / float-range-1.c
1 /* Floating constants outside the range of their type should receive a
2    pedwarn, not a warning.  */
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4 /* { dg-do compile } */
5 /* { dg-options "-ansi -pedantic-errors" } */
6
7 void
8 f (void)
9 {
10   float a = 1e+100000000f; /* { dg-error "error: floating constant exceeds range of 'float'" } */
11   double b = 1e+100000000; /* { dg-error "error: floating constant exceeds range of 'double'" } */
12   long double c = 1e+100000000l; /* { dg-error "error: floating constant exceeds range of 'long double'" } */
13 }