All of lore.kernel.org
 help / color / mirror / Atom feed
* do { } while (0) question
@ 2006-08-01  8:21 Heiko Carstens
  2006-08-01  8:45 ` Jonathan Matthews-Levine
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Heiko Carstens @ 2006-08-01  8:21 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel; +Cc: Martin Schwidefsky

Hi Andrew,

your commit e2c2770096b686b4d2456173f53cb50e01aa635c does this:

---
Always use do {} while (0).  Failing to do so can cause subtle compile
failures or bugs.

-#define hotcpu_notifier(fn, pri)
-#define register_hotcpu_notifier(nb)
-#define unregister_hotcpu_notifier(nb)
+#define hotcpu_notifier(fn, pri)	do { } while (0)
+#define register_hotcpu_notifier(nb)	do { } while (0)
+#define unregister_hotcpu_notifier(nb)	do { } while (0)
---

I'm really wondering what these subtle compile failures or bugs are.
Could you please explain?

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-08-01 16:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-01  8:21 do { } while (0) question Heiko Carstens
2006-08-01  8:45 ` Jonathan Matthews-Levine
2006-08-01  8:53   ` Heiko Carstens
2006-08-01 16:26     ` Andrew James Wade
2006-08-01  8:49 ` Andrew Morton
2006-08-01  8:52 ` Jiri Slaby
2006-08-01  9:03   ` Hua Zhong
2006-08-01  9:39     ` Peter Zijlstra
2006-08-01  9:46       ` Jiri Slaby
2006-08-01  9:57         ` Russell King
2006-08-01 10:04           ` Jiri Slaby
2006-08-01  9:59         ` Peter Zijlstra
2006-08-01 10:03           ` Jiri Slaby
2006-08-01 14:49   ` Horst H. von Brand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.