* gcc.dg/20061124-1.c: Add exit() function prototype.
[official-gcc.git] / gcc / testsuite / gcc.dg / float-range-1.c
blobe14e345aba301f43d40f7f9a144b583ac743d71b
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" } */
7 void
8 f (void)
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'" } */