ms-extensions.c revision 6ab55ebab20086f725c4017b48ef8d7691ef870f
180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s 280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru 380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru__int8 x1 = 3i8; 480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru__int16 x2 = 4i16; 580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru__int32 x3 = 5i32; 680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru__int64 x5 = 0x42i64; 780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru__int64 x4 = 70000000i128; 880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru 980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru__int64 y = 0x42i64u; // expected-error {{invalid suffix}} 1080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru__int64 w = 0x43ui64; 1180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru__int64 z = 9Li64; // expected-error {{invalid suffix}} 1280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru__int64 q = 10lli64; // expected-error {{invalid suffix}} 1380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru 1480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru// radar 7562363 1580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#define ULLONG_MAX 0xffffffffffffffffui64 1680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#define UINT 0xffffffffui32 1780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#define USHORT 0xffffui16 1880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#define UCHAR 0xffui8 190a657bbc2c6fc9daf699942e023050536d5ec95fDerek Sollenberger 2080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queruvoid a() { 2180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru unsigned long long m = ULLONG_MAX; 2280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru unsigned int n = UINT; 2358190644c30e1c4aa8e527f3503c58f841e0fcf3Derek Sollenberger unsigned short s = USHORT; 2458190644c30e1c4aa8e527f3503c58f841e0fcf3Derek Sollenberger unsigned char c = UCHAR; 2558190644c30e1c4aa8e527f3503c58f841e0fcf3Derek Sollenberger} 2680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru 2780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queruvoid pr_7968() 2880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru{ 2980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru int var1 = 0x1111111e+1; 3080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru int var2 = 0X1111111e+1; 3180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru int var3 = 0xe+1; 3280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru int var4 = 0XE+1; 3380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru 347839ce1af63bf12fe7b3caa866970bbbb3afb13dDerek Sollenberger int var5= 0\ 3580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Querux1234e+1; 3680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru 3780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru int var6= 3880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru /*expected-warning {{backslash and newline separated by space}} */ 0\ 3980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Querux1234e+1; 40096defe64d408e54474fe19f418c95bf1a554fc7Derek Sollenberger} 4180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru 4280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru