Skip to content

#if u8'\xff' != 0xff fails in the preprocessor unless -funsigned-char is specified #54886

@tbaederr

Description

@tbaederr

From a discussion in https://reviews.llvm.org/D119221:

The following test case fails, unless -funsigned-char is specified; u8 character literals should always produce an unsigned char in C2x.

#if u8'\xff' != 0xff
#error uh oh
#endif

See also: https://godbolt.org/z/Tb7z85ToG

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions