https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108694

--- Comment #3 from Aaron Ballman <aaron at aaronballman dot com> ---
(In reply to Bruno Haible from comment #2)
> But '-Wdeprecated-non-prototype' does not exactly have the behaviour you
> want: while it warns for 'func1 (1);' and 'func3 (3);' (good!), it warns
> also for 'void func3 ();', that is, where you don't want to see a warning.

FWIW, the reason you get a warning on the declaration of `func3` in Clang is
because of the definition of `func3` that is invalid in C2x but was valid in
prior standards modes. If you do not provide a problematic conflicting
definition, the diagnostic is silenced: https://godbolt.org/z/aMPrvWz1j

Reply via email to