Skip to content

gh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac - #99406

Merged
kumaraditya303 merged 1 commit into
python:mainfrom
thesamesam:more-clang16
Nov 26, 2022
Merged

kumaraditya303 merged 1 commit into
python:mainfrom
thesamesam:more-clang16

Conversation

@thesamesam

@thesamesam thesamesam commented Nov 12, 2022 •

Copy link
Copy Markdown
Contributor

…n fixes

Followup to 12078e7. I ended up missing a few, apparently.

Clang 16 makes -Wimplicit-function-declaration an error by default and warns on -Wstrict-prototypes. It's free to fix -Wstrict-prototypes while we're here and it futureproofs us, so throw that in.

The only notable part of this which might not be super obvious is <stddef.h> for size_t.

See: 12078e7
Signed-off-by: Sam James sam@gentoo.org

@thesamesam

Copy link
Copy Markdown
Contributor Author

cc @erlend-aasland @kumaraditya303, followup from #99085.

Apologies for missing a few!

As penance, I'm going to do a followup now (but not generate configure yet as it won't be suitable to merge unless/until this is) in another PR for some AC_LANG_SOURCE porting (not doing it here to ease backporting).

@thesamesam

Copy link
Copy Markdown
Contributor Author

ping

…aration fixes

Followup to 12078e7. I ended up missing
a few, apparently.

Clang 16 makes -Wimplicit-function-declaration an error by default
and warns on -Wstrict-prototypes. It's free to fix -Wstrict-prototypes
while we're here and it futureproofs us, so throw that in.

The only notable part of this which might not be super obvious is
<stddef.h> for size_t.

See: 12078e7

@kumaraditya303 kumaraditya303 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks fine but I would like a review from @erlend-aasland

@erlend-aasland erlend-aasland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, looks good to me! Sorry for the delay.

@kumaraditya303 kumaraditya303 changed the title gh-99086: Further -Wstrict-prototypes, -Wimplicit-function-declaratio… Nov 26, 2022
@kumaraditya303
kumaraditya303 merged commit e35ca41 into python:main Nov 26, 2022
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @thesamesam for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @thesamesam and @kumaraditya303, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker e35ca417fe81a64985c2b29e863ce418ae75b96e 3.11

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry @thesamesam and @kumaraditya303, I had trouble checking out the 3.10 backport branch.
Please retry by removing and re-adding the "needs backport to 3.10" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker e35ca417fe81a64985c2b29e863ce418ae75b96e 3.10

@kumaraditya303

Copy link
Copy Markdown
Contributor

@thesamesam Can you create the backports? thanks

@thesamesam

Copy link
Copy Markdown
Contributor Author

@kumaraditya303 Happy to, thanks folks!

@thesamesam
thesamesam deleted the more-clang16 branch November 30, 2022 06:39
thesamesam added a commit to thesamesam/cpython that referenced this pull request Dec 1, 2022
…eclaration warnings in configure.ac (pythonGH-99406)

Follow up to 12078e7.
(cherry picked from commit e35ca41)
thesamesam added a commit to thesamesam/cpython that referenced this pull request Dec 1, 2022
…eclaration warnings in configure.ac (pythonGH-99406)

Follow up to 12078e7.
(cherry picked from commit e35ca41)

Co-authored-by: Sam James <sam@gentoo.org>
thesamesam added a commit to thesamesam/cpython that referenced this pull request Dec 1, 2022
…eclaration warnings in configure.ac (pythonGH-99406)

Follow up to 12078e7..
(cherry picked from commit e35ca41)

Co-authored-by: Sam James <sam@gentoo.org>
@bedevere-bot

Copy link
Copy Markdown

GH-99919 is a backport of this pull request to the 3.11 branch.

@bedevere-bot

Copy link
Copy Markdown

GH-99920 is a backport of this pull request to the 3.10 branch.

@bedevere-bot

Copy link
Copy Markdown

GH-99920 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit that referenced this pull request Dec 1, 2022
GH-99919)

…tion warnings in configure.ac (GH-99406)

Follow up to 12078e7. (cherry picked from commit e35ca41)
kumaraditya303 pushed a commit that referenced this pull request Dec 1, 2022
#99920)

[3.10] gh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac (GH-99406)

Follow up to 12078e7.
(cherry picked from commit e35ca41)

Co-authored-by: Sam James <sam@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request May 21, 2024
…eclara… (python#99920)

[3.10] pythongh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac (pythonGH-99406)

Follow up to 12078e7.
(cherry picked from commit e35ca41)

Co-authored-by: Sam James <sam@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request May 21, 2024
…eclara… (python#99920)

[3.10] pythongh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac (pythonGH-99406)

Follow up to 12078e7.
(cherry picked from commit e35ca41)

Co-authored-by: Sam James <sam@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…eclara… (python#99920)

[3.10] pythongh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac (pythonGH-99406)

Follow up to 12078e7.
(cherry picked from commit e35ca41)

Co-authored-by: Sam James <sam@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
…eclara… (python#99920)

[3.10] pythongh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac (pythonGH-99406)

Follow up to 12078e7.
(cherry picked from commit e35ca41)

Co-authored-by: Sam James <sam@gentoo.org>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Jul 30, 2025
…eclara… (python#99920)

[3.10] pythongh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac (pythonGH-99406)

Follow up to 12078e7.
(cherry picked from commit e35ca41)

Co-authored-by: Sam James <sam@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants