Shih-wei Liao | f8fd82b | 2010-02-10 11:10:31 -0800 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s |
| 2 | |
| 3 | __int8 x1 = 3i8; |
| 4 | __int16 x2 = 4i16; |
| 5 | __int32 x3 = 5i32; |
| 6 | __int64 x5 = 0x42i64; |
| 7 | __int64 x4 = 70000000i128; |
| 8 | |
| 9 | __int64 y = 0x42i64u; // expected-error {{invalid suffix}} |
| 10 | __int64 w = 0x43ui64; |
| 11 | __int64 z = 9Li64; // expected-error {{invalid suffix}} |
| 12 | __int64 q = 10lli64; // expected-error {{invalid suffix}} |
| 13 | |
| 14 | // radar 7562363 |
| 15 | #define ULLONG_MAX 0xffffffffffffffffui64 |
| 16 | #define UINT 0xffffffffui32 |
| 17 | #define USHORT 0xffffui16 |
| 18 | #define UCHAR 0xffui8 |
| 19 | |
| 20 | void a() { |
| 21 | unsigned long long m = ULLONG_MAX; |
| 22 | unsigned int n = UINT; |
| 23 | unsigned short s = USHORT; |
| 24 | unsigned char c = UCHAR; |
| 25 | } |