<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 --- - clang fails to compile source with unicode literals under -std=gnu99" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24188&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=OGyFUwtwCPa8DhCQlCBiDa7JbDh18Izr8BlAZUZk0IM&s=LQWMyQGrrj6UlI7SYaJ768S3z0BZAcY5xoMqH2e8XGI&e=">24188</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang fails to compile source with unicode literals under -std=gnu99
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.4
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jeansaad@ca.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>clang fails to compile source with unicode literals under -std=gnu99.
gcc allows unicode literals under -std=gnu99 in support of TR 19769.

clang version used was 3.4; however it was tested as far back as 3.2 with same
behavior and possibly goes back a lot further.

### STANDALONE SOURCE:
#include <uchar.h>

int main(void) {
    char16_t c16 = u'\u00F6';
    char32_t c32 = U'\U0010FFFF';
}

### COMPILER INVOCATION:
clang -std=gnu99 -c unicode_literals.c

### EXPECTED OUTPUT:
Successful compile.

### ACTUAL OUTPUT:
unicode_literals.c:4:17: error: use of undeclared identifier 'u'
        char16_t c16 = u'\u00F6';
                       ^
unicode_literals.c:5:17: error: use of undeclared identifier 'U'
        char32_t c32 = U'\U0010FFFF';
                       ^
2 errors generated.

### clang -v OUTPUT:
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix

### GCC INVOCATION:
gcc -std=gnu99 -c unicode_literals.c

## gcc -v OUTPUT:
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)</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>