Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7ddbf105
Commit
7ddbf105
authored
Sep 23, 2011
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable unused result warnings when possible
parent
a1fe1f8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
configure
configure
+43
-0
configure.in
configure.in
+22
-0
No files found.
configure
View file @
7ddbf105
...
...
@@ -5561,6 +5561,49 @@ $as_echo "$ac_cv_no_strict_aliasing" >&6; }
BASECFLAGS
=
"
$BASECFLAGS
-fno-strict-aliasing"
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking if we can turn off
$CC
unused result warning"
>
&5
$as_echo_n
"checking if we can turn off
$CC
unused result warning... "
>
&6
;
}
ac_save_cc
=
"
$CC
"
CC
=
"
$CC
-Wunused-result -Werror"
save_CFLAGS
=
"
$CFLAGS
"
if
${
ac_cv_disable_unused_result_warning
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
ac_cv_disable_unused_result_warning
=
yes
else
ac_cv_disable_unused_result_warning
=
no
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
fi
CFLAGS
=
"
$save_CFLAGS
"
CC
=
"
$ac_save_cc
"
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_disable_unused_result_warning
"
>
&5
$as_echo
"
$ac_cv_disable_unused_result_warning
"
>
&6
;
}
if
test
$ac_cv_disable_unused_result_warning
=
yes
then
BASECFLAGS
=
"
$BASECFLAGS
-Wno-unused-result"
fi
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
# support. Without this, treatment of subnormals doesn't follow
# the standard.
...
...
configure.in
View file @
7ddbf105
...
...
@@ -981,6 +981,28 @@ yes)
BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
fi
AC_MSG_CHECKING(if we can turn off $CC unused result warning)
ac_save_cc="$CC"
CC="$CC -Wunused-result -Werror"
save_CFLAGS="$CFLAGS"
AC_CACHE_VAL(ac_cv_disable_unused_result_warning,
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM([[]], [[]])
],[
ac_cv_disable_unused_result_warning=yes
],[
ac_cv_disable_unused_result_warning=no
]))
CFLAGS="$save_CFLAGS"
CC="$ac_save_cc"
AC_MSG_RESULT($ac_cv_disable_unused_result_warning)
if test $ac_cv_disable_unused_result_warning = yes
then
BASECFLAGS="$BASECFLAGS -Wno-unused-result"
fi
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
# support. Without this, treatment of subnormals doesn't follow
# the standard.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment