| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s |
| 2 |
// RUN: %clang_cc1 -fsyntax-only -verify -fms-compatibility %s |
| 3 |
// RUN: %clang_cc1 -fsyntax-only -verify -triple i386-pc-win32 -fms-compatibility %s |
| 4 |
|
| 5 |
__int8 x1 = 3i8; |
| 6 |
__int16 x2 = 4i16; |
| 7 |
__int32 x3 = 5i32; |
| 8 |
__int64 x5 = 0x42i64; |
| 9 |
__int64 x6 = 0x42I64; |
| 10 |
|
| 11 |
__int64 y = 0x42i64u; // expected-error {{invalid suffix}} |
| 12 |
__int64 w = 0x43ui64; |
| 13 |
__int64 z = 9Li64; // expected-error {{invalid suffix}} |
| 14 |
__int64 q = 10lli64; // expected-error {{invalid suffix}} |
| 15 |
|
| 16 |
__complex double c1 = 1i; |
| 17 |
__complex double c2 = 1.0i; |
| 18 |
__complex float c3 = 1.0if; |
| 19 |
|
| 20 |
#define ULLONG_MAX 0xffffffffffffffffui64 |
| 21 |
#define UINT 0xffffffffui32 |
| 22 |
#define USHORT 0xffffui16 |
| 23 |
#define UCHAR 0xffui8 |
| 24 |
|
| 25 |
void a(void) { |
| 26 |
unsigned long long m = ULLONG_MAX; |
| 27 |
unsigned int n = UINT; |
| 28 |
unsigned short s = USHORT; |
| 29 |
unsigned char c = UCHAR; |
| 30 |
} |
| 31 |
|
| 32 |
void pr_7968(void) |
| 33 |
{ |
| 34 |
int var1 = 0x1111111e+1; |
| 35 |
int var2 = 0X1111111e+1; |
| 36 |
int var3 = 0xe+1; |
| 37 |
int var4 = 0XE+1; |
| 38 |
|
| 39 |
int var5= 0\ |
| 40 |
x1234e+1; |
| 41 |
|
| 42 |
int var6= |
| 43 |
/*expected-warning {{backslash and newline separated by space}} */ 0\ |
| 44 |
x1234e+1; |
| 45 |
} |
| 46 |
|