Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: feature deprecation warnings in gcc >= 4.3 #9667

Closed
wants to merge 1 commit into from

Conversation

monnerat
Copy link
Contributor

@monnerat monnerat commented Oct 7, 2022

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.

@monnerat monnerat force-pushed the deprecation branch 7 times, most recently from 1513465 to 8c2bfbc Compare October 14, 2022 12:58
@monnerat monnerat force-pushed the deprecation branch 3 times, most recently from d5ed271 to 6b934fb Compare October 19, 2022 11:02
@monnerat monnerat force-pushed the deprecation branch 2 times, most recently from 7f5b3c9 to 5e853b5 Compare October 29, 2022 16:50
@monnerat monnerat force-pushed the deprecation branch 2 times, most recently from b06a4df to 6e780fd Compare November 11, 2022 15:41
@@ -886,6 +888,7 @@ CURLOPT_WS_OPTIONS 7.86.0
CURLOPT_XFERINFODATA 7.32.0
CURLOPT_XFERINFOFUNCTION 7.32.0
CURLOPT_XOAUTH2_BEARER 7.33.0
CURLOPTDEPRECATED 7.89.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7.87.0 and merge asap?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, done and rebased.
Maybe wait for the CI tests to complete before merge?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI tests complete now. Failed tests seems not related.

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.
@bagder
Copy link
Member

bagder commented Nov 15, 2022

Thanks!

@monnerat monnerat deleted the deprecation branch November 15, 2022 12:37
vszakats added a commit to curl/curl-for-win that referenced this pull request Dec 5, 2022
Handle the addition of CURL_DEPRECATED() macros. Adding them made some
declarations multi-line.

Also fix finding some declarations when headers have CRLF EOLs.

Ref: curl/curl#9667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants