public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* macros:  "do-while" versus "({ })" and a compile-time error
@ 2007-01-08 18:50 Robert P. J. Day
  2007-01-09 17:08 ` H. Peter Anvin
  2007-01-09 17:33 ` Stefan Richter
  0 siblings, 2 replies; 12+ messages in thread
From: Robert P. J. Day @ 2007-01-08 18:50 UTC (permalink / raw)
  To: Linux kernel mailing list


  just to stir the pot a bit regarding the discussion of the two
different ways to define macros, i've just noticed that the "({ })"
notation is not universally acceptable.  i've seen examples where
using that notation causes gcc to produce:

  error: braced-group within expression allowed only inside a function

i wasn't aware that there were limits on this notation.  can someone
clarify this?  under what circumstances *can't* you use that notation?
thanks.

rday

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

end of thread, other threads:[~2007-01-10 22:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-08 18:50 macros: "do-while" versus "({ })" and a compile-time error Robert P. J. Day
2007-01-09 17:08 ` H. Peter Anvin
2007-01-09 17:33 ` Stefan Richter
2007-01-09 19:23   ` linux-os (Dick Johnson)
2007-01-09 20:19     ` Stefan Richter
2007-01-10  6:20     ` Robert P. J. Day
2007-01-10 12:16       ` linux-os (Dick Johnson)
2007-01-10 13:46         ` Robert P. J. Day
2007-01-10 14:07           ` linux-os (Dick Johnson)
2007-01-10 18:25           ` Stefan Richter
2007-01-10 21:49         ` J.A. Magallón
2007-01-10 22:04           ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox