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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [warning1.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 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|initializ" }
11
  static const float nan = 0.0f / 0.0f; // { dg-warning "0.0|float|initializ" }
12
};
13
 
14
int main()
15
{
16
  // { dg-prune-output "not a member" }
17
  printf("%f\n%f\n", S::inf, S::nan);
18
  return 0;
19
}

powered by: WebSVN 2.1.0

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