]> git.ipfire.org Git - thirdparty/curl.git/commit
lib: feature deprecation warnings in gcc >= 4.3
authorPatrick Monnerat <patrick@monnerat.net>
Mon, 14 Nov 2022 14:21:34 +0000 (15:21 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 15 Nov 2022 09:57:29 +0000 (10:57 +0100)
commit6967571bf20624bc4cfa68fb8f90cbc53a87c6f2
treeaade9e07dd5e175fcc04aa35d64bc437bdaee43d
parent980510926d97e0513c4495473618473b41695836
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
39 files changed:
docs/examples/Makefile.am
docs/libcurl/curl_easy_setopt.3
docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3
docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3
docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3
docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3
docs/libcurl/symbols-in-versions
include/curl/curl.h
include/curl/multi.h
include/curl/typecheck-gcc.h
tests/Makefile.am
tests/badsymbols.pl
tests/check-deprecated.pl [new file with mode: 0755]
tests/data/Makefile.inc
tests/data/test1222 [new file with mode: 0644]
tests/extern-scan.pl
tests/libtest/lib1512.c
tests/libtest/lib1513.c
tests/libtest/lib1535.c
tests/libtest/lib1555.c
tests/libtest/lib1558.c
tests/libtest/lib1591.c
tests/libtest/lib1911.c
tests/libtest/lib1912.c
tests/libtest/lib516.c
tests/libtest/lib547.c
tests/libtest/lib552.c
tests/libtest/lib554.c
tests/libtest/lib555.c
tests/libtest/lib566.c
tests/libtest/lib578.c
tests/libtest/lib579.c
tests/libtest/lib599.c
tests/libtest/lib650.c
tests/libtest/lib651.c
tests/libtest/lib670.c
tests/libtest/libntlmconnect.c
tests/libtest/mk-lib1521.pl
tests/unit/unit1308.c