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

Re: svn commit: r10422 - trunk/build

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2004-07-28 07:04:00 CEST

Max Bowsher wrote:

>Ben Reser wrote:
>
>
>>On Wed, Jul 28, 2004 at 01:39:39AM +0100, Max Bowsher wrote:
>>
>>
>>>Ben Reser wrote:
>>>
>>>
>>>>Did you mean type-prunned?
>>>>
>>>>
>>>And 'prun' isn't a word! :-)
>>>
>>>
>>Okay so I meant pruned.
>>
>>
>
>Right :-)
>
>Regardless, type-punned is what the error really says.
>
>It's something to do with strict aliasing.
>
Yup. According to C aliasing rules, the meaning of the following code is
undefined, even on architectures where int and long have the same size
and layout (i.e., are effectively the same type as far as the processor
is concerned)::

    {
      long foo = 1;
      (*(int*)(&foo)) = 2;
      printf("%ld", foo);
    }

> The cure is to pick up a set of
>CFLAGS from Python, which happens to include -fno-strict-aliasing when using
>GCC.
>
>
"A new enough version of" GCC. Anythng above 3.0, IIRC.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 28 07:04:17 2004

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