diff --git a/ChangeLog b/ChangeLog index a5936e2a25..1e8f033de1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri May 21 17:35:15 2010 Nobuyoshi Nakada + + * configure.in (warnflags): add -pedantic if gcc. + + * include/ruby/ruby.h (rb_intern): C90 needs nonempty macro + arguments. + Fri May 21 13:55:46 2010 Nobuyoshi Nakada * configure.in (LIBRUBYARG_SHARED): shared library will not be diff --git a/configure.in b/configure.in index e3856d6de4..d0ffa7115d 100644 --- a/configure.in +++ b/configure.in @@ -386,6 +386,7 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then AS_CASE([" $warnflags "],[*" -Wno-missing-field-initializers "*], [wflag=-Wextra], [wflag=-Wall]) RUBY_TRY_CFLAGS($wflag, [warnflags="$wflag${warnflags+ $warnflags}"]) + warnflags="-pedantic{warnflags+ $warnflags}" fi test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ARCH_FLAG\"" diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index edfa3f41a1..989a2851b0 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1080,7 +1080,7 @@ VALUE rb_id2str(ID); * since gcc-2.7.2.3 at least. */ #define rb_intern(str) \ (__builtin_constant_p(str) ? \ - __extension__ (CONST_ID_CACHE(/**/, str)) : \ + __extension__ (CONST_ID_CACHE((ID), str)) : \ rb_intern(str)) #define rb_intern_const(str) \ (__builtin_constant_p(str) ? \