annotate gcc/testsuite/gcc.dg/float-range-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Floating constants outside the range of their type should receive a
kono
parents:
diff changeset
2 just a warning if the target supports infinities. Otherwise, a
kono
parents:
diff changeset
3 pedwarn should be produced. */
kono
parents:
diff changeset
4 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
kono
parents:
diff changeset
5 /* { dg-do compile } */
kono
parents:
diff changeset
6 /* { dg-options "-ansi -pedantic-errors -Woverflow" } */
kono
parents:
diff changeset
7 /* { dg-skip-if "No Inf support" { spu-*-* } } */
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 void
kono
parents:
diff changeset
10 f (void)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 float a = 1e+100000000f; /* { dg-warning "floating constant exceeds range of 'float'" } */
kono
parents:
diff changeset
13 double b = 1e+100000000; /* { dg-warning "floating constant exceeds range of 'double'" } */
kono
parents:
diff changeset
14 long double c = 1e+100000000l; /* { dg-warning "floating constant exceeds range of 'long double'" } */
kono
parents:
diff changeset
15 }