Issue |
129365
|
Summary |
[C23] Compound literal with `constexpr` (or any other) storage specifier emits syntax error
|
Labels |
new issue
|
Assignees |
|
Reporter |
euclidianAce
|
I couldn't find a specific issue on this, but it is part of C23. See `6.5.3.6p7` and `6.6.3p6`
Simple repro
```c
int main() {
int x = (constexpr int){1};
}
```
```
$ clang repro.c -std=c23 -Wall -Wextra -pedantic
repro.c:2:11: error: expected _expression_
2 | int x = (constexpr int){1};
| ^
1 error generated.
```
```
$ clang --version
clang version 19.1.7
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/azdqrk7n19ipjh2yav5kllzll7a49phn-clang-19.1.7/bin
```
Looking through `clang/test/Sema/constexpr.c` this case wasn't covered
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs