[PATCH 2] fix broken strict aliasing

Brandon Black blblack at gmail.com
Sat Feb 20 16:41:35 CET 2010


On Sat, Feb 20, 2010 at 9:06 AM, Marc Lehmann <schmorp at schmorp.de> wrote:
> On Fri, Feb 19, 2010 at 07:28:03PM +0100, Luca Barbato <lu_zero at gentoo.org> wrote:
>> > so you need to identify where the warnings originate (e..g in your
>> > compiler) and then ask this question to those people who actually control
>> > the code that generates such bogus warnings.
>>
>> Are you _sure_ those are bogus? If you are using x86 with an ancient gcc
>
> Is there any evidence to the contrary? If yes, I would be happy to hear of
> it.
>

I've seen this strict-aliasing issues with libev + gcc 4.4 as well.  I
haven't bothered to report it yet simply because I haven't had the
time to sort out exactly what's going on, and whether it's a real
issue that needs to be fixed, or as you've said, just an annoying
bogus warning.  The newer versions of gcc are very aggressive about
aliasing assumptions for optimization, and my hunch is that this is a
real issue with newer gcc's that really care about strict aliasing,
but it's just a hunch at this point.  I plan at some point in the next
few days to dig into this in detail and sort it out for sure one way
or the other.

-- Brandon



More information about the libev mailing list