mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-108562: Fix compiler warnings for libmpdec (#114751)
If awailable, enable -fstrict-overflow for libmpdec. Also shut off false positive warnings (-Warray-bounds). The later was backported from mpdecimal-4.0.0.
This commit is contained in:
parent
67f742e03a
commit
002a5948fc
5 changed files with 16 additions and 3 deletions
|
|
@ -3896,6 +3896,11 @@ AS_VAR_IF([with_system_libmpdec], [yes], [
|
|||
LIBMPDEC_LDFLAGS="-lm \$(LIBMPDEC_A)"
|
||||
LIBMPDEC_INTERNAL="\$(LIBMPDEC_HEADERS) \$(LIBMPDEC_A)"
|
||||
|
||||
dnl Enable strict-overflow for libmpdec, if available, see GH-108562
|
||||
AS_VAR_IF([ac_cv_cc_supports_fstrict_overflow], [yes], [
|
||||
AS_VAR_APPEND([LIBMPDEC_CFLAGS], [" -fstrict-overflow"])
|
||||
])
|
||||
|
||||
dnl Disable forced inlining in debug builds, see GH-94847
|
||||
AS_VAR_IF([with_pydebug], [yes], [
|
||||
AS_VAR_APPEND([LIBMPDEC_CFLAGS], [" -DTEST_COVERAGE"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue