Xavier Bestel wrote: > On Tue, 2010-02-02 at 18:13 +0000, Matthew Barnes wrote: > >> On Tue, 2010-02-02 at 12:27 -0500, Paul Smith wrote: >> >>> Anyway, I agree with you that if Evo makes use of this type of aliasing >>> then we should definitely add that flag to the default makefile flags. >>> Configure can check for it and use it if present. >>> >> Done. Although, I imagine many distros have already disabled strict >> aliasing optimization due to all the compiler warnings we used to have >> about it. >> >> If GCC or even LLVM ever learns to detect cases like what Jeff ran into >> and -warn- about them, I'd love to know about it so I can it to our >> already lengthy list of warning flags we build with by default now. >> > > I don't know ... Jeff's demonstration was using obviously wrong C code, > so I'm on GCC side for that one. >
It's only wrong if you are targeting c99 (evolution was written to target c89 - that may have changed a bit since I've left the project, but the demonstration code is perfectly legal in c89 and works on all of the big-name compilers). This type of trick is used all over the place. In any case, the workaround is to just specify -fno-strict-aliasing. Jeff _______________________________________________ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers