cast question, again

Egon Eckert egon.eckert at heaven-industries.com
Fri Aug 29 17:11:23 CEST 2008


Hi,

sorry about introducing the ever-appearing aliasing-warnings theme :)...  Can
someone, please, explain why *not* doing the cast in following macro
definition:

#define ev_timer_set(ev,after_,repeat_)     do { ((ev_watcher_time *)(ev))->at = (after_); (ev)->repeat = (repeat_); } while (0)

would break the code (provided the API is being used correctly and not
abused).  I noticed this claim browsing the list archive here:

http://lists.schmorp.de/pipermail/libev/2008q2/000376.html

To not upset the (very respected) macro author I'd like to suggest that
solving the issue somehow could silence similar question appearing in this
list forever... :)

Thanks,

Egon



More information about the libev mailing list