[Clang] Assignability of statement-expression struct result diverges from GCC
Open
clang:frontend
diverges-from:gcc
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```c
int main() {
struct { int i; } s;
({ s; }).i = 7; // GCC allow, Clang reject
}
```
https://c.godbolt.org/z/W5zv7rMaY
Contributor guide
Research direction
Start by compiling the provided C reproducer with Clang and GCC and compare the diagnostics for assigning through the statement-expression result. The issue names no source file or test, so trace Clang's statement-expression and member-assignment handling; done means Clang accepts the assignment consistently with GCC and has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100