Re: [sigc] Patch for an ancient version of libsigc++



On Tue, 2009-02-10 at 22:43 +0000, Adam Sampson wrote:
> Hi,
> 
> I'm aware that this is a patch for an ancient version of libsigc++ --
> but it's the last 1.2 version, and there are a still a few packages
> around that want the old library,

There are?

>  so I figured I might as well send it
> in...

Thanks, but please add patches to bugzilla. At the least, please use the
mailing list.

However, libsigc++ 1.2 is very unmaintained. I can't even get it to
build with recent versions of autotools. You might have more success -
it is in the svn archive here:
http://svn-archive.gnome.org/svn/libsigc++/trunk/

> The patch fixes a test that GCC 4.3.3 miscompiles, since it invokes
> undefined behaviour (I think?) -- it changes result twice between
> sequence points, and GCC happily optimises away one of the writes,
> meaning the test fails.
> 
> diff -x config.log -x config.status -ru tmp/libsigc++-1.2.7/tests/retype_return_test.cc work/libsigc++-1.2.7/tests/retype_return_test.cc
> --- tmp/libsigc++-1.2.7/tests/retype_return_test.cc	2001-05-21 22:26:16.000000000 +0100
> +++ work/libsigc++-1.2.7/tests/retype_return_test.cc	2009-02-10 22:28:20.000000000 +0000
> @@ -14,7 +14,8 @@
>    {
>      cout << ">>test 1"<<endl;
>      Slot0<int> s=retype_return<int>(slot(&foo));
> -    cout << (result+=s()) <<endl;
> +    int t=s();
> +    cout << (result+=t) <<endl;
>  
>      cout << ">>test 2"<<endl;
>      Slot0<void> s2=retype_return<void>(slot(&foo));
> 
> Thanks,
> 
-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]