mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in (warnflags): added some default flags,
pointer-arith, write-strings and shorten-64-to-32, but suppress unused-parameter and missing-field-initializers, if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2b9df35cd0
commit
ab46076e38
2 changed files with 21 additions and 2 deletions
|
@ -1,4 +1,8 @@
|
|||
Thu Mar 12 05:27:06 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Thu Mar 12 05:49:05 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (warnflags): added some default flags,
|
||||
pointer-arith, write-strings and shorten-64-to-32, but suppress
|
||||
unused-parameter and missing-field-initializers, if possible.
|
||||
|
||||
* configure.in (RUBY_CHECK_HUGE): checks whether a value range is
|
||||
larger than long.
|
||||
|
|
17
configure.in
17
configure.in
|
@ -217,7 +217,7 @@ AC_PROG_GCC_TRADITIONAL
|
|||
test $ac_cv_prog_cc_g = yes && : ${debugflags=-g}
|
||||
if test "$GCC" = yes; then
|
||||
linker_flag=-Wl,
|
||||
: ${optflags=-O3} ${warnflags="-Wall -Wno-parentheses"}
|
||||
: ${optflags=-O3}
|
||||
else
|
||||
linker_flag=
|
||||
fi
|
||||
|
@ -320,6 +320,21 @@ AC_SUBST(CHDIR)
|
|||
dnl }
|
||||
dnl compiler section {
|
||||
|
||||
if test "$GCC:${warnflags+set}:no" = yes::no; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
for wflag in -Wno-missing-field-initializers -Wshorten-64-to-32; do
|
||||
CFLAGS="$CFLAGS $wflag"
|
||||
AC_MSG_CHECKING([whether $wflag is accepted])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
[warnflags="${warnflags+$warnflags }$wflag"
|
||||
AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_RESULT(no)])
|
||||
done
|
||||
CFLAGS="$save_CFLAGS"
|
||||
unset save_CFLAGS
|
||||
warnflags="-Wall -Wno-unused-parameter -Wno-parentheses ${warnflags+$warnflags }-Wpointer-arith -Wwrite-strings"
|
||||
fi
|
||||
|
||||
dnl check for large file stuff
|
||||
mv confdefs.h confdefs1.h
|
||||
: > confdefs.h
|
||||
|
|
Loading…
Reference in a new issue