https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113825
Bug ID: 113825
Summary: missing warning for omitted parameter names in
function definitions (c23 extension)
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: jemarch at gcc dot gnu.org
Target Milestone: ---
Given this code:
struct bpf_iter_num;
static inline int bpf_iter_num_next(struct bpf_iter_num *) { return 1; }
Clang gives us this warning:
clang -target x86_64 -c foo.c
foo.c:2:58: warning: omitting the parameter name in a function definition is a
C23 extension [-Wc23-extensions]
2 | static inline int bpf_iter_num_next(struct bpf_iter_num *) { return 1;
}
| ^
1 warning generated.
However, GCC doesn't emit any warning even when it is explicitly invoked with
-std=gnu89 or -std=c99.
Shall we emit warnings for this and other C23 extensions when not building with
std=c23?