[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: findings on swig-java-bindings

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-03-13 03:17:08 CET

Ben Reser <ben@reser.org> writes:

>> Gustav and I investigated these warnings via the gcc man page's doc for its
>> -fstrict-aliasing flag.

> I'd rather figure out how to fix the code than to turn off warnings. If
> you want to grab me sometime I'll be happy to work with you to see if we
> can't come up with a way to fix the warnings.

The code in question is something like

    svn_txdelta_window_t *arg1 = (svn_txdelta_window_t *) 0 ;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, ...

One way to make it warning free would be

     svn_txdelta_window_t *arg1 = (svn_txdelta_window_t *) 0 ;
     void *tmp = arg1;
     if ((SWIG_ConvertPtr(obj0, &tmp, ....
     arg1 = tmp;

I think gcc is warning that an optimizing compiler could assume that
SWIG_ConvertPtr will not change arg1.

http://www.gnu.org/software/gcc/bugs.html#nonbugs_c
http://mail-index.netbsd.org/tech-kern/2003/08/11/0001.html

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 13 03:17:24 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.