Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tbaederr opened this issue Apr 13, 2022 · 2 comments
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@tbaederr
Copy link
Contributor

tbaederr commented Apr 13, 2022

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

@tbaederr tbaederr added clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed new issue labels Apr 13, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Apr 13, 2022

@llvm/issue-subscribers-clang-frontend

@tahonermann
Copy link
Contributor

This is an issue for both C2x and C++17:

mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this issue Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

3 participants