OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [other/] [warning1.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.