aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow.C
blob: 9b3b1fa0ea564e1dce971f2007e4f7a75e217c47 (plain)
1
2
3
4
5
6
// { dg-options "-std=c++0x -w" }

#include <limits.h>
extern constexpr int max_s = INT_MAX + 1;  // { dg-error "" }
extern constexpr unsigned max_u = UINT_MAX + 1u;  // OK
extern constexpr int abs_s = -INT_MIN;  // { dg-error "" } overflows on 2's complement machines