Uh oh!
There was an error while loading. Please reload this page.
gh-96821: Check for -fstrict-overflow only if --with-strict-overflow is passed - #139595
gh-96821: Check for -fstrict-overflow only if --with-strict-overflow is passed#139595StanFromIreland wants to merge 4 commits into
-fstrict-overflow only if --with-strict-overflow is passed#139595Conversation
StanFromIreland
commented
Nov 8, 2025
Friendly ping @erlend-aasland / @hauntsaninja :-) |
| 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] | ||
| ) | ||
| ) |
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.)
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.
There was a problem hiding this comment.
Using AX_CHECK_COMPILE_FLAG makes it more complicated to follow IMO, but I pushed the change.
There was a problem hiding this comment.
Sorry, I should've been more specific. Currently, we check for the compile flag first, then we check for the configure flag. Now, you've embedded the compile check into the configure flag check. I suggest keeping the original structure. We should be able to use AX_CHECK_COMPILE_FLAG to check for the compile flag(s), and then use those results when we check for the configure flag.
This PR is stale because it has been open for 30 days with no activity. |
-fstrict-overflow#96821