OSDN Git Service

Some raw string changes from N3077
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / other / warning1.C
1 // { dg-do compile }
2
3 // PR c++/7804
4 // Floating point formatting in error and warning messages
5
6 extern "C" int printf(const char *, ...);
7
8 struct S
9 {
10   static const float inf = 1.0f / 0.0f; // { dg-warning "1.0|float|initialization" }
11   static const float nan = 0.0f / 0.0f; // { dg-warning "0.0|float|initialization" }
12 };
13
14 int main()
15 {
16   printf("%f\n%f\n", S::inf, S::nan);
17   return 0;
18 }