Liste des Groupes | Revenir à cl c |
On Sun, 30 Jun 2024 17:54:14 +0200
David Brown <david.brown@hesbynett.no> wrote:
Deprecated does not mean you can't, or even should not, use the feature. It is just a warning that it might be removed some time in the future. I personally agree that it would be have been better if there had been a warning here, but compatibility with existing code meant that gcc choose to be conservative. I've had "-Wstrict-prototypes" in my makefiles for decades. So I am glad to see C23 removing non-prototype declarations entirely, only 20 years or so late. But the default flags and settings are not picked for what you or I would like.But why would you expect a warning from code that is perfectly legalI expect warning at -Wall, because it is deprecated. Those who do
and well-defined C code, without explicitly enabling warnings that
check for particular style issues? Non-prototype function
declarations are deprecated (since C99), but not removed from the
language until C23 (where that declaration is now a function
prototype).
not want warning can turn it off explicitly with -Wno-strict-prototypes
or whatever the name of the switch.
Les messages affichés proviennent d'usenet.