[PATCH 2] fix broken strict aliasing

Alejandro Mery amery at geeks.cl
Mon Feb 22 16:33:38 CET 2010

On Mon, Feb 22, 2010 at 16:11, Marc Lehmann <schmorp at schmorp.de> wrote:
> On Mon, Feb 22, 2010 at 10:56:24AM +0100, Alejandro Mery <amery at geeks.cl> wrote:
>> what compiler are you using? because gcc produces these warnings with
>> every version since libev got born.
> gcc, and this is not true.

so my sample code compiled for -O2 or higher or -Os doesn't dump the
warning fest with your gcc version?

I don't claim libev is buggy or that gcc is buggy, i simply say that
the way that macro-magic is implemented confuses the compiler. it
doesn't allow it to optimize correctly and who knows if it can trigger
gcc-bugs, and also fills the compilation logs of our programs with
tons of noise that doesn't allow libev users to see clearly real
warnings/errors that do need to get fixed.

so maybe those macros could be rewritten in a way that doesn't
"confuse" the compilers and fill the compile log of noise just for the
sake of the mental sanity of libev users? :)

More information about the libev mailing list