[Clang] Clang incorrectly accepts `volatile volatile;` as a statement
Open
accepts-invalid
clang:diagnostics
diverges-from:gcc
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Clang accepts the following C program without any diagnostics:
```
int a() {
volatile volatile;
}
int main() {}
```
GCC correctly rejects this one. Please refer to the link: https://godbolt.org/z/eq6e8o67o
Contributor guide
Research direction
Start by compiling the C reproducer from the issue with Clang and GCC, and compare the diagnostics with the linked Godbolt example. No source file or test is named; the work is done when Clang rejects `volatile volatile;` as a statement with an appropriate diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100