Re: ISO C23 removal of unprototyped functions

Bruno Haible <[email protected]> Wed, 08 Feb 2023 13:01:37 +0100
Newsgroups dev.linux.lists.distributions
Message-ID <3651423.PdnHiajgbn@nimes>
A. Wilcox asked:
> What is the minimum version of GCC to detect this?
> 
> Is there a warning flag that could pick it up before this commit was
> introduced?
> 
> Is the only released compiler that can warn on this Clang 15?[1]

As far as I understand from [1][2]:

The way to get exactly the pertinent diagnostics is to use clang 15
with options
  -std=c2x -Wincompatible-function-pointer-types
and look at all errors and warnings.

If one uses clang 15 with options
  -std=c17 -Wdeprecated-non-prototype
and looks at all warnings, one gets most, but not all, of the needed
diagnostics.

If one uses GCC 12, there are not the appropriate warning options. [2]

Bruno

[1] https://discourse.llvm.org/t/unresolved-issues-from-the-llvm-15-x-release/66071/34
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108694#c2