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 Oct 14, 2022
@monnerat monnerat force-pushed the deprecation branch 3 times, most recently from d5ed271 to 6b934fb Compare Oct 19, 2022
@monnerat monnerat force-pushed the deprecation branch 2 times, most recently from 7f5b3c9 to 5e853b5 Compare Oct 29, 2022
bagder
bagder approved these changes Nov 7, 2022
@monnerat monnerat force-pushed the deprecation branch 2 times, most recently from b06a4df to 6e780fd Compare Nov 11, 2022
@@ -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

@bagder bagder Nov 14, 2022

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

@monnerat monnerat Nov 14, 2022

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

@bagder bagder Nov 14, 2022

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

@monnerat monnerat Nov 14, 2022

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 Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants