ruby-changes:28079
From: nobu <ko1@a...>
Date: Fri, 5 Apr 2013 23:08:31 +0900 (JST)
Subject: [ruby-changes:28079] nobu:r40131 (trunk): configure.in: no -Wextra-token on gcc 3
nobu 2013-04-05 23:08:21 +0900 (Fri, 05 Apr 2013) New Revision: 40131 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40131 Log: configure.in: no -Wextra-token on gcc 3 * configure.in (warnflags): -Wextra-tokens is same as -Wextra and let -Wno- options ignored on gcc 3. Modified files: trunk/configure.in Index: configure.in =================================================================== --- configure.in (revision 40130) +++ configure.in (revision 40131) @@ -419,6 +419,8 @@ AC_SUBST(LD) https://github.com/ruby/ruby/blob/trunk/configure.in#L419 if test "$GCC" = yes; then linker_flag=-Wl, : ${optflags=-O3} + gcc_major=`echo =__GNUC__ | $CC -E -xc - | sed '/^=/!d;s///'` + test -n "$gcc_major" || gcc_major=0 # RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"]) else linker_flag= @@ -664,6 +666,11 @@ AC_ARG_ENABLE(werror, https://github.com/ruby/ruby/blob/trunk/configure.in#L666 rb_cv_warnflags="$warnflags" if test "$GCC:${warnflags+set}:no" = yes::no; then + if test $gcc_major -ge 4; then + extra_warning=-Werror=extra-tokens + else + extra_warning= + fi for wflag in -Wno-unused-parameter -Wno-parentheses -Wno-long-long \ -Wno-missing-field-initializers \ -Wunused-variable \ @@ -672,7 +679,7 @@ if test "$GCC:${warnflags+set}:no" = yes https://github.com/ruby/ruby/blob/trunk/configure.in#L679 -Werror=declaration-after-statement \ -Werror=shorten-64-to-32 \ -Werror=implicit-function-declaration \ - -Werror=extra-tokens \ + $extra_warning \ ; do if test "$particular_werror_flags" != yes; then wflag=`echo x$wflag | sed 's/^x-Werror=/-W/;s/^x//'` -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/