diff options
author | Marek Polacek <polacek@redhat.com> | 2014-05-27 11:41:45 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-05-27 11:41:45 +0000 |
commit | 2ef321b15a55046e0f75924b4dd4a844435c909a (patch) | |
tree | 54541d3a33661466a01c4ad0d413c6a833876c1a /gcc | |
parent | c7eca9fe8a3918ba7136535d010ccef8b911fd25 (diff) | |
download | gcc-2ef321b15a55046e0f75924b4dd4a844435c909a.zip gcc-2ef321b15a55046e0f75924b4dd4a844435c909a.tar.gz gcc-2ef321b15a55046e0f75924b4dd4a844435c909a.tar.bz2 |
re PR testsuite/61319 (The tests c-c++-common/ubsan/float-cast-overflow-(1|2|4).c fail on x86_64-apple-darwin*)
PR testsuite/61319
* c-c++-common/ubsan/float-cast.h: Conditionally define LLONG_MAX,
LLONG_MIN, and ULLONG_MAX.
From-SVN: r210970
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/ubsan/float-cast.h | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3491f6e..ccc321f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-05-27 Marek Polacek <polacek@redhat.com> + + PR testsuite/61319 + * c-c++-common/ubsan/float-cast.h: Conditionally define LLONG_MAX, + LLONG_MIN, and ULLONG_MAX. + 2014-05-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * lib/target-supports.exp (check_effective_target_vect_bswap): diff --git a/gcc/testsuite/c-c++-common/ubsan/float-cast.h b/gcc/testsuite/c-c++-common/ubsan/float-cast.h index 166da8f..e76171a 100644 --- a/gcc/testsuite/c-c++-common/ubsan/float-cast.h +++ b/gcc/testsuite/c-c++-common/ubsan/float-cast.h @@ -1,5 +1,16 @@ /* Various macros for -fsanitize=float-cast-overflow testing. */ +/* E.g. on CentOS 5 these aren't defined in limits.h. */ +#ifndef LLONG_MAX +# define LLONG_MAX __LONG_LONG_MAX__ +#endif +#ifndef LLONG_MIN +# define LLONG_MIN (-__LONG_LONG_MAX__ - 1LL) +#endif +#ifndef ULLONG_MAX +# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL) +#endif + #define INT128_MAX (__int128) (((unsigned __int128) 1 << ((__SIZEOF_INT128__ * __CHAR_BIT__) - 1)) - 1) #define INT128_MIN (-INT128_MAX - 1) #define UINT128_MAX ((2 * (unsigned __int128) INT128_MAX) + 1) |