2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s
|
2011-10-24 23:27:23 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -fms-compatibility %s
|
2014-06-22 07:32:05 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -triple i386-pc-win32 -fms-compatibility %s
|
2009-11-28 21:37:52 +08:00
|
|
|
|
|
|
|
__int8 x1 = 3i8;
|
|
|
|
__int16 x2 = 4i16;
|
|
|
|
__int32 x3 = 5i32;
|
|
|
|
__int64 x5 = 0x42i64;
|
2010-10-14 08:24:10 +08:00
|
|
|
__int64 x6 = 0x42I64;
|
2009-11-28 21:37:52 +08:00
|
|
|
|
|
|
|
__int64 y = 0x42i64u; // expected-error {{invalid suffix}}
|
2010-01-23 05:36:53 +08:00
|
|
|
__int64 w = 0x43ui64;
|
2009-11-28 21:37:52 +08:00
|
|
|
__int64 z = 9Li64; // expected-error {{invalid suffix}}
|
|
|
|
__int64 q = 10lli64; // expected-error {{invalid suffix}}
|
2010-01-23 05:36:53 +08:00
|
|
|
|
2014-05-30 07:10:15 +08:00
|
|
|
__complex double c1 = 1i;
|
|
|
|
__complex double c2 = 1.0i;
|
|
|
|
__complex float c3 = 1.0if;
|
|
|
|
|
2010-01-23 05:36:53 +08:00
|
|
|
// radar 7562363
|
|
|
|
#define ULLONG_MAX 0xffffffffffffffffui64
|
|
|
|
#define UINT 0xffffffffui32
|
2010-01-23 06:30:25 +08:00
|
|
|
#define USHORT 0xffffui16
|
|
|
|
#define UCHAR 0xffui8
|
2010-01-23 05:36:53 +08:00
|
|
|
|
|
|
|
void a() {
|
|
|
|
unsigned long long m = ULLONG_MAX;
|
|
|
|
unsigned int n = UINT;
|
|
|
|
unsigned short s = USHORT;
|
|
|
|
unsigned char c = UCHAR;
|
|
|
|
}
|
2010-08-30 22:50:47 +08:00
|
|
|
|
|
|
|
void pr_7968()
|
|
|
|
{
|
|
|
|
int var1 = 0x1111111e+1;
|
|
|
|
int var2 = 0X1111111e+1;
|
|
|
|
int var3 = 0xe+1;
|
|
|
|
int var4 = 0XE+1;
|
2010-09-01 00:42:00 +08:00
|
|
|
|
|
|
|
int var5= 0\
|
|
|
|
x1234e+1;
|
|
|
|
|
|
|
|
int var6=
|
|
|
|
/*expected-warning {{backslash and newline separated by space}} */ 0\
|
|
|
|
x1234e+1;
|
2010-08-30 22:50:47 +08:00
|
|
|
}
|
2010-09-01 00:42:00 +08:00
|
|
|
|