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

[Clang] Clang erroneously allows if constexpr in C23 mode #112587

Open
Sirraide opened this issue Oct 16, 2024 · 4 comments
Open

[Clang] Clang erroneously allows if constexpr in C23 mode #112587

Sirraide opened this issue Oct 16, 2024 · 4 comments
Assignees
Labels
accepts-invalid c23 clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party regression:19 Regression in 19 release

Comments

@Sirraide
Copy link
Contributor

See https://godbolt.org/z/E8PEzzfP3. According to @AaronBallman, this isn’t intentional, so we should probably disallow this.

@Sirraide Sirraide added c23 clang:frontend Language frontend issues, e.g. anything involving "Sema" accepts-invalid labels Oct 16, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Oct 16, 2024

@llvm/issue-subscribers-clang-frontend

Author: None (Sirraide)

See https://godbolt.org/z/E8PEzzfP3. According to @AaronBallman, this isn’t intentional, so we should probably disallow this.

@AaronBallman AaronBallman added the confirmed Verified by a second party label Oct 16, 2024
@AaronBallman
Copy link
Collaborator

It would be really nice if we could get a fix for this in to Clang 19.x

@shafik shafik added the regression:19 Regression in 19 release label Oct 16, 2024
@Fznamznon
Copy link
Contributor

I don't think this is a regression since clang 18 doesn't support c23 constexpr.

@shafik
Copy link
Collaborator

shafik commented Oct 17, 2024

I don't think this is a regression since clang 18 doesn't support c23 constexpr.

I guess I look at it as if constexpr is now erroneously enabled in C whereas previously it was a hard error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepts-invalid c23 clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party regression:19 Regression in 19 release
Projects
None yet
Development

No branches or pull requests

5 participants