gh-96821: Check for -fstrict-overflow only if --with-strict-overflow is passed#139595
Open
StanFromIreland wants to merge 4 commits intopython:mainfrom
Open
gh-96821: Check for -fstrict-overflow only if --with-strict-overflow is passed#139595StanFromIreland wants to merge 4 commits intopython:mainfrom
-fstrict-overflow only if --with-strict-overflow is passed#139595StanFromIreland wants to merge 4 commits intopython:mainfrom
Conversation
Member
Author
|
Friendly ping @erlend-aasland / @hauntsaninja :-) |
configure.ac
Outdated
Comment on lines
+2238
to
+2246
| CFLAGS="-fstrict-overflow -fno-strict-overflow" | ||
| AC_CACHE_CHECK([if $CC supports -fstrict-overflow and -fno-strict-overflow], | ||
| [ac_cv_cc_supports_fstrict_overflow], | ||
| AC_COMPILE_IFELSE( | ||
| [AC_LANG_PROGRAM([[]], [[]])], | ||
| [ac_cv_cc_supports_fstrict_overflow=yes], | ||
| [ac_cv_cc_supports_fstrict_overflow=no] | ||
| ) | ||
| ) |
Contributor
There was a problem hiding this comment.
We should be fine with using AX_CHECK_COMPILE_FLAG here. (I don't remember why I did not recommend that when we added this code.)
Member
Author
There was a problem hiding this comment.
Are you suggesting we just check -fstrict-overflow? Currently it checks both -fstrict-overflow and -fno-strict-overflow.
Member
Author
There was a problem hiding this comment.
Using AX_CHECK_COMPILE_FLAG makes it more complicated to follow IMO, but I pushed the change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-fstrict-overflow#96821