Open llvmbot opened 7 years ago
This non-conforming behavior is enabled by -fms-extensions, which is enabled by default when targeting Windows. You should be able to disable this with -fno-ms-extensions.
Reid, presumably this should be behind -fms-compatibility instead, since it's a non-conforming language change?
Sure, r283227. However, Iliya will have to pass -fno-ms-compatibility
to get the right behavior on Windows.
You can also pass -fno-ms-extensions
as a workaround to get the right behavior today, but this will probably break parsing most MSVC system headers.
This non-conforming behavior is enabled by -fms-extensions
, which is enabled by default when targeting Windows. You should be able to disable this with -fno-ms-extensions
.
Reid, presumably this should be behind -fms-compatibility
instead, since it's a non-conforming language change?
Extended Description
In the following code the
<=
expression is being evaluated as false:According to C++11 standard 2.14.2 [lex.icon]: hexadecimal constant suffixed with "LL" that does not "fit" into
long long int
, but does "fit" intounsigned long long int
, should be represented by the latter. In this case our constant:0xD48FBCB67A80957D < 2^64 - 1
That means that it can be represented byunsigned long long int
, and the<=
expression should be evaluated astrue
;The command used to compile is:
clang file.cpp -std=c++11 -o file.exe
Compiler version:The compiler prints out the following warning: