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

typeof_unqual outside C2X using alternate keyword #76423

Closed
crosdahl opened this issue Dec 27, 2023 · 1 comment · Fixed by #87392
Closed

typeof_unqual outside C2X using alternate keyword #76423

crosdahl opened this issue Dec 27, 2023 · 1 comment · Fixed by #87392
Labels
c23 clang:frontend Language frontend issues, e.g. anything involving "Sema" extension:gnu

Comments

@crosdahl
Copy link

gcc has __typeof_unqual__ as an alternate spelling for typeof_unqual which works in all c versions.
gcc docs reference: https://gcc.gnu.org/onlinedocs/gcc/Typeof.html

@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" extension:gnu and removed new issue labels Dec 27, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Dec 27, 2023

@llvm/issue-subscribers-clang-frontend

Author: None (crosdahl)

gcc has `__typeof_unqual__` as an alternate spelling for `typeof_unqual` which works in all c versions. gcc docs reference: https://gcc.gnu.org/onlinedocs/gcc/Typeof.html

nathanchance added a commit that referenced this issue Apr 3, 2024
GCC has added __typeof_unqual__ to allow typeof_unqual to be used in all
C modes (not just C23 and newer), similar to __typeof__ and typeof.

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=607d9d50ee44163cee621cd991600acaf78c2fee

The Linux kernel would like to start using __typeof_unqual__ to strip
type qualifiers such as address spaces from inputs to macros but cannot
switch to C23 due to compiler version requirements.

Match GCC and allow __typeof_unqual__ in all C modes.

Closes: #76423
Link: https://lore.kernel.org/CAFULd4YG21NdF_qNVBGDtXO6xnaYFeRPvKicB=gpgUUqYE=4jw@mail.gmail.com/
qihangkong pushed a commit to rvgpu/llvm that referenced this issue Apr 18, 2024
GCC has added __typeof_unqual__ to allow typeof_unqual to be used in all
C modes (not just C23 and newer), similar to __typeof__ and typeof.

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=607d9d50ee44163cee621cd991600acaf78c2fee

The Linux kernel would like to start using __typeof_unqual__ to strip
type qualifiers such as address spaces from inputs to macros but cannot
switch to C23 due to compiler version requirements.

Match GCC and allow __typeof_unqual__ in all C modes.

Closes: llvm/llvm-project#76423
Link: https://lore.kernel.org/CAFULd4YG21NdF_qNVBGDtXO6xnaYFeRPvKicB=gpgUUqYE=4jw@mail.gmail.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c23 clang:frontend Language frontend issues, e.g. anything involving "Sema" extension:gnu
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants