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

gh-99086: Fix implicit int warning in configure check for PTHREAD_SCOPE_SYSTEM (#99085) #99085

Merged
merged 3 commits into from
Nov 5, 2022

Conversation

thesamesam
Copy link
Contributor

@thesamesam thesamesam commented Nov 4, 2022

Clang 16 makes -Wimplicit-int fatal by default.

Avoids errors like:

conftest.c:142:7: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]

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

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Nov 4, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

thesamesam added a commit to thesamesam/cpython that referenced this pull request Nov 4, 2022
…ck (python#99085)

Clang 16 makes -Wimplicit-int fatal by default.

Avoids errors like:
```
conftest.c:142:7: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
```

Signed-off-by: Sam James <sam@gentoo.org>
@thesamesam thesamesam changed the title configure.ac: Fix -Wimplicit-int in PTHREAD_SCOPE_SYSTEM check h-99086: Build: Fix -Wimplicit-int in PTHREAD_SCOPE_SYSTEM check (#99085) Nov 4, 2022
@thesamesam thesamesam changed the title h-99086: Build: Fix -Wimplicit-int in PTHREAD_SCOPE_SYSTEM check (#99085) gh-99086: Build: Fix -Wimplicit-int in PTHREAD_SCOPE_SYSTEM check (#99085) Nov 4, 2022
thesamesam added a commit to thesamesam/cpython that referenced this pull request Nov 4, 2022
…ck (python#99085)

Clang 16 makes -Wimplicit-int fatal by default.

Avoids errors like:
```
conftest.c:142:7: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
```

Signed-off-by: Sam James <sam@gentoo.org>
…ck (python#99085)

Clang 16 makes -Wimplicit-int fatal by default.

Avoids errors like:
```
conftest.c:142:7: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
```

Signed-off-by: Sam James <sam@gentoo.org>
Copy link
Contributor

@kumaraditya303 kumaraditya303 left a comment

Choose a reason for hiding this comment

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

LGTM

@kumaraditya303 kumaraditya303 added type-bug An unexpected behavior, bug, or error needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Nov 4, 2022
Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

One small nit regarding the NEWS entry. The AC fix is fine with me, but IMO using AC_LANG_PROGRAM iso. AC_LANG_SOURCE would have been better.

@erlend-aasland erlend-aasland self-assigned this Nov 4, 2022
@erlend-aasland erlend-aasland changed the title gh-99086: Build: Fix -Wimplicit-int in PTHREAD_SCOPE_SYSTEM check (#99085) gh-99086: Fix implicit int warning in configure check for PTHREAD_SCOPE_SYSTEM (#99085) Nov 4, 2022
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Nov 4, 2022
These warnings became fatal by default in Clang 16.

Most of this has since been fixed upstream but
python#99085 is pending.

Signed-off-by: Sam James <sam@gentoo.org>
@thesamesam
Copy link
Contributor Author

One small nit regarding the NEWS entry. The AC fix is fine with me, but IMO using AC_LANG_PROGRAM iso. AC_LANG_SOURCE would have been better.

Ah, that's a fair point. I've got an absolute tonne of these to fix (https://lwn.net/SubscriberLink/913505/b61bbc0c4296117f/) so I've been trying to make non-invasive changes. Is it alright if I leave this one as-is?

@erlend-aasland
Copy link
Contributor

Ah, that's a fair point. I've got an absolute tonne of these to fix (https://lwn.net/SubscriberLink/913505/b61bbc0c4296117f/) so I've been trying to make non-invasive changes. Is it alright if I leave this one as-is?

Yeah, leave this as it is. We can get rid of AC_LANG_SOURCE in a separate issue/PR.

@erlend-aasland erlend-aasland merged commit 12078e7 into python:main Nov 5, 2022
@miss-islington
Copy link
Contributor

Thanks @thesamesam for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @thesamesam and @erlend-aasland, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 12078e78f6e4a21f344e4eaff529e1ff3b97734f 3.11

@miss-islington
Copy link
Contributor

Sorry @thesamesam and @erlend-aasland, 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 12078e78f6e4a21f344e4eaff529e1ff3b97734f 3.10

erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this pull request Nov 5, 2022
… check for PTHREAD_SCOPE_SYSTEM (pythonGH-99085)

(cherry picked from commit 12078e7)

Co-authored-by: Sam James <sam@cmpct.info>
erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this pull request Nov 5, 2022
… check for PTHREAD_SCOPE_SYSTEM (pythonGH-99085)

(cherry picked from commit 12078e7)

Co-authored-by: Sam James <sam@cmpct.info>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Nov 5, 2022
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Nov 5, 2022
erlend-aasland added a commit that referenced this pull request Nov 5, 2022
… for PTHREAD_SCOPE_SYSTEM (GH-99085) (#99118)

(cherry picked from commit 12078e7)

Co-authored-by: Sam James <sam@cmpct.info>
@thesamesam
Copy link
Contributor Author

thesamesam commented Nov 5, 2022

Thank you!

@thesamesam thesamesam deleted the clang-16 branch November 5, 2022 18:31
erlend-aasland added a commit that referenced this pull request Nov 6, 2022
… for PTHREAD_SCOPE_SYSTEM (GH-99085) (#99119)

(cherry picked from commit 12078e7)

Co-authored-by: Sam James <sam@cmpct.info>

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

Clang 16 makes -Wimplicit-int fatal by default.

Avoids errors like:
```
conftest.c:142:7: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
```

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

Clang 16 makes -Wimplicit-int fatal by default.

Avoids errors like:
```
conftest.c:142:7: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
```

Signed-off-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
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants