<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - A long long constant is out of range"
   href="https://llvm.org/bugs/show_bug.cgi?id=30605">30605</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>A long long constant is out of range
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++11
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>iliyaaizin@mail.tau.ac.il
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In the following code the "<=" expression is being evaluated as false:
///////////////////////////////////
#include <stdio.h>

int main()
{
    short  sh = 9L;
    unsigned int ui1 = (sh <= 0xD48FBCB67A80957DLL);
    printf("%X\n", ui1); 
}
////////////////////////////////////
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" into unsigned
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 by unsigned long long int, and 
the "<=" expression should be evaluated as true;

The command used to compile is: clang file.cpp -std=c++11 -o file.exe
Compiler version:
clang version 3.8.1 (branches/release_38)
Target: i686-pc-windows-msvc
Thread model: posix

The compiler prints out the following warning:
//////////////////////////////////////////////////////
clang+vs.cpp:8:25: warning: comparison of constant -3130075724073888387 with
expression of type 'short' is always false
      [-Wtautological-constant-out-of-range-compare]
        unsigned int ui1 = (sh <= 0xD48FBCB67A80957DLL);
                            ~~ ^  ~~~~~~~~~~~~~~~~~~~~
1 warning generated.
///////////////////////////////////////////////////////////</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>