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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [pr29571.C] - Rev 774

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

// PR c++/29571

struct A
{
  static const int i = 0/0 + ""; // { dg-warning "division by zero" }
  // { dg-error "constant|conversion|initializ" "" { target *-*-* } 5 }
  static const int j = int(i);
};

// Currently G++ complains about a non-constant initializer for 'j' in
// C++11 mode, but not C++98.  Either way is correct because it depends on
// the erroneous initializer for i, so don't require the error.
// { dg-prune-output ":7:" }

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

powered by: WebSVN 2.1.0

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