
* lib/g++-dg.exp (g++-dg-runtest): Run tests in C++1y mode, too. * lib/target-supports.exp (check_effective_target_c++11): Now means C++11 and up. (check_effective_target_c++11_only): New. (check_effective_target_c++11_down): New. (check_effective_target_c++1y): New. (check_effective_target_c++1y_only): New. (check_effective_target_c++98_only): Rename from check_effective_target_c++98. * g++.dg/*: Use { target c++11 } instead of -std=c++11. From-SVN: r208416
13 lines
396 B
C
13 lines
396 B
C
// { dg-do compile { target c++11 } }
|
|
|
|
// Test arithmetic operations
|
|
|
|
void fun()
|
|
{
|
|
nullptr = 0; // { dg-error "lvalue required as left operand" }
|
|
nullptr + 2; // { dg-error "invalid operands of types " }
|
|
decltype(nullptr) mynull = 0;
|
|
mynull = 1; // { dg-error "cannot convert" }
|
|
mynull = 0;
|
|
mynull + 2; // { dg-error "invalid operands of types " }
|
|
}
|