Skip to content

Commit 9952983

Browse files
committed
bpo-5755: don't use compiler flag -Wstrict-prototypes (GH-7395)
1 parent b274f1c commit 9952983

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
No longer use the ``-Wstrict-prototypes`` compiler flag.
2+
This avoids a compiler warning when compiling C++ extension modules
3+
with distutils.

configure

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6011,9 +6011,6 @@ if test "${OPT-unset}" = "unset"
60116011
then
60126012
case $GCC in
60136013
yes)
6014-
if test "$CC" != 'g++' ; then
6015-
STRICT_PROTO="-Wstrict-prototypes"
6016-
fi
60176014
# For gcc 4.x we need to use -fwrapv so lets check if its supported
60186015
if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
60196016
WRAP="-fwrapv"
@@ -6030,13 +6027,13 @@ then
60306027
if test "$Py_DEBUG" = 'true' ; then
60316028
# Optimization messes up debuggers, so turn it off for
60326029
# debug builds.
6033-
OPT="-g -O0 -Wall $STRICT_PROTO"
6030+
OPT="-g -O0 -Wall"
60346031
else
6035-
OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6032+
OPT="-g $WRAP -O3 -Wall"
60366033
fi
60376034
;;
60386035
*)
6039-
OPT="-O3 -Wall $STRICT_PROTO"
6036+
OPT="-O3 -Wall"
60406037
;;
60416038
esac
60426039
case $ac_sys_system in

configure.ac

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,9 +1071,6 @@ if test "${OPT-unset}" = "unset"
10711071
then
10721072
case $GCC in
10731073
yes)
1074-
if test "$CC" != 'g++' ; then
1075-
STRICT_PROTO="-Wstrict-prototypes"
1076-
fi
10771074
# For gcc 4.x we need to use -fwrapv so lets check if its supported
10781075
if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
10791076
WRAP="-fwrapv"
@@ -1090,13 +1087,13 @@ then
10901087
if test "$Py_DEBUG" = 'true' ; then
10911088
# Optimization messes up debuggers, so turn it off for
10921089
# debug builds.
1093-
OPT="-g -O0 -Wall $STRICT_PROTO"
1090+
OPT="-g -O0 -Wall"
10941091
else
1095-
OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
1092+
OPT="-g $WRAP -O3 -Wall"
10961093
fi
10971094
;;
10981095
*)
1099-
OPT="-O3 -Wall $STRICT_PROTO"
1096+
OPT="-O3 -Wall"
11001097
;;
11011098
esac
11021099
case $ac_sys_system in

0 commit comments

Comments
 (0)