https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128321
Bug ID: 128321
Summary: [17 Regression] Accepts-invalid missing
default-argument expression accepted ('int = ,')
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: 652023330028 at smail dot nju.edu.cn
Target Milestone: ---
GCC trunk accepts the following invalid program without any diagnostics:
https://godbolt.org/z/zaja74bP9
```c++
void f(int = , int = 1);
```
```
$ g++ -std=c++17 -pedantic-errors -c t.cpp
$ echo $?
0
```
Clang trunk and GCC 16.2 reject it:
```
$ clang++ -std=c++17 -pedantic-errors -c t.cpp
t.cpp:1:14: error: expected expression
```