LWN.net Logo

The timer API: size or type safety?

The timer API: size or type safety?

Posted Jan 3, 2007 19:48 UTC (Wed) by rjbell4 (guest, #35764)
In reply to: The timer API: size or type safety? by jzbiciak
Parent article: The timer API: size or type safety?

The reason you wouldn't necessarily do that is that "data" may actually be an expression that has a side effect, so you don't want to reference it twice.


(Log in to post comments)

The timer API: size or type safety?

Posted Jan 3, 2007 19:59 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246) [Link]

So, I guess typeof(*data) doesn't evaluate data then? I guess that makes sense.

The timer API: size or type safety?

Posted Jan 3, 2007 20:01 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246) [Link]

Actually, hold on... (0 && func(data)) shouldn't evaluate data a second time under any circumstances anyway.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds