diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
commit | 2b6b257f4e5503a7a2675bdb8735693db769f75c (patch) | |
tree | e85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /test/SemaCXX/integer-overflow.cpp | |
parent | b4348ed0b7e90c0831b925fbee00b5f179a99796 (diff) |
Notes
Diffstat (limited to 'test/SemaCXX/integer-overflow.cpp')
-rw-r--r-- | test/SemaCXX/integer-overflow.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/SemaCXX/integer-overflow.cpp b/test/SemaCXX/integer-overflow.cpp index 566bb05fa0cb..a119f0eabe3a 100644 --- a/test/SemaCXX/integer-overflow.cpp +++ b/test/SemaCXX/integer-overflow.cpp @@ -1,6 +1,11 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only -std=gnu++98 +// RUN: %clang_cc1 %s -verify -fsyntax-only -std=gnu++98 -triple x86_64-pc-linux-gnu typedef unsigned long long uint64_t; -typedef unsigned long long uint32_t; +typedef unsigned int uint32_t; + +// Check integer sizes. +int array64[sizeof(uint64_t) == 8 ? 1 : -1]; +int array32[sizeof(uint32_t) == 4 ? 1 : -1]; +int arrayint[sizeof(int) < sizeof(uint64_t) ? 1 : -1]; uint64_t f0(uint64_t); uint64_t f1(uint64_t, uint32_t); |