------- Comment #3 from mattias at virtutech dot se 2006-03-10 15:30 ------- Yes, I realise it's the implicit integral conversion that causes the warning, but since the result is not used no matter what it seems wrong to warn for it - it cannot reasonably a sign of an error in the code.
It can be hard to avoid unless the exact types and sizes are known - for instance, adding (long) casts to both branches will not prevent the warning from being generated. This causes headaches with -Werror. In fact, adding an (int) cast before h() will suppress the warning but a (long) cast before g() will not. I see no sensible way of getting rid of the warning at all, save casting the whole result to void (which isn't desirable for a function-like macro). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26632