[llvm-bugs] [Bug 38582] u8 character literal prefix is causing an error despite it being part of the standard

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 29 15:31:19 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38582

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |richard-llvm at metafoo.co.uk
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
This is not part of any C standard. C11 6.4.4.4/1 (unchanged in C17):

character-constant:
    ' c-char-sequence '
    L' c-char-sequence '
    u' c-char-sequence '
    U' c-char-sequence '

Note that there is no u8 production. Accepting u8'...' as a character literal
is not a conforming extension; note that this valid C code:

#define u8 char k =
u8'x';

... would be rejected if u8'x' were lexed as a single token instead of two.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180829/361af3a4/attachment.html>


More information about the llvm-bugs mailing list