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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [noexcept09.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
// Test that -Wnoexcept works with templates
2
// { dg-options "-std=c++0x -Wnoexcept" }
3
 
4
template 
5
T f (T t) { return t; }         // { dg-warning "does not throw" }
6
 
7
#define SA(X) static_assert(X, #X)
8
 
9
SA (!noexcept(f(1)));           // { dg-warning "noexcept" }
10
 
11
int main()
12
{
13
  f(1);                         // Use f(int) so it gets instantiated
14
}

powered by: WebSVN 2.1.0

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