lib: feature deprecation warnings in gcc >= 4.3

Add a deprecated attribute to functions and enum values that should not
be used anymore.
This uses a gcc 4.3 dialect, thus is only available for this version of
gcc and newer. Note that the _Pragma() keyword is introduced by C99, but
is available as part of the gcc dialect even when compiling in C89 mode.

It is still possible to disable deprecation at a calling module compile
time by defining CURL_DISABLE_DEPRECATION.

Gcc type checking macros are made aware of possible deprecations.

Some testing support Perl programs are adapted to the extended
declaration syntax.

Several test and unit test C programs intentionally use deprecated
functions/options and are annotated to not generate a warning.

New test 1222 checks the deprecation status in doc and header files.

Closes #9667
This commit is contained in:
Patrick Monnerat 2022-11-14 15:21:34 +01:00 committed by Daniel Stenberg
parent 980510926d
commit 6967571bf2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
39 changed files with 771 additions and 243 deletions

View file

@ -34,7 +34,8 @@ EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl \
manpage-scan.pl nroff-scan.pl http2-server.pl dictserver.py \
negtelnetserver.py smbserver.py util.py \
disable-scan.pl manpage-syntax.pl error-codes.pl badsymbols.pl \
azure.pm appveyor.pm version-scan.pl options-scan.pl markdown-uppercase.pl
azure.pm appveyor.pm version-scan.pl options-scan.pl markdown-uppercase.pl \
check-deprecated.pl
DISTCLEANFILES = configurehelp.pm