Hi,
In <df2177af0601011323rba520den7588bba539372be6@mail.gmail.com>
"Re: swig-rb 1.3.x r17949: FAIL (i686-pc-linux-gnu shared)" on Sun, 1 Jan 2006 16:23:03 -0500,
David James <james82@gmail.com> wrote:
> > subversion/bindings/swig/ruby/svn_client.c:7625: warning: dereferencing type-punned pointer will break strict-aliasing rules
> > [... lots of strict-aliasing warnings ...]
>
> Looks like the Ruby bindings need a configure check to add
> -fno-strict-aliasing. It might be possible to figure out whether
> no-strict-aliasing is needed by looking at the flags which were used
> to compile Ruby.
In <20060102211920.GA8315@p12n.org>
"Re: swig-rb 1.3.x r17949: FAIL (i686-pc-linux-gnu shared)" on Mon, 2 Jan 2006 15:19:20 -0600,
Peter Samuelson <peter@p12n.org> wrote:
> > AC_CACHE_CHECK([how to compile Ruby extensions], [svn_cv_ruby_compile],[
> > - svn_cv_ruby_compile="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(CC)), %q( ), Config::CONFIG.fetch(%q(CFLAGS))'` \$(SWIG_RB_INCLUDES)"
> > + svn_cv_ruby_compile="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(CC)), %q( ), Config::CONFIG.fetch(%q(CFLAGS))'`"
> > + if echo $svn_cv_ruby_compile | grep -- -Wall > /dev/null 2>&1; then
> > + svn_cv_ruby_compile="$svn_cv_ruby_compile -fno-strict-aliasing"
> > + fi
> > + svn_cv_ruby_compile="$svn_cv_ruby_compile \$(SWIG_RB_INCLUDES)"
> > ])
>
> Uh ... -fno-strict-aliasing isn't just to suppress warnings. It is a
> functional change to work around bugs exposed by gcc type aliasing
> optimisations. As such, it really has nothing to do with -Wall. I
> mean, either you want it or you don't.
I fixed this problem in r18015 by overriding SWIG default
typemap instead of -fno-strict-aliasing.
Thanks,
--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 8 03:41:15 2006