Boost logo

Boost Users :

From: Dave Steffen (dgsteffen_at_[hidden])
Date: 2005-06-29 11:59:27

Bronek Kozicki writes:
> Dave Steffen <dgsteffen_at_[hidden]> wrote:
> > #define FOO(T) \
> #define FOO do{/* here goes your macro */} while(0)

 Yes, I've seen this in the GCC documentation. Unfortunately, it
 doesn't help if you're doing the sort of preprocessor metaprogramming
 we're doing. In one case in particular, the end result of the macro
 really is supposed to be a _function declaration_, not a section of

 In another case, it shows up from the construct


 I don't claim to understand everything that's going on here (even
 remotely), but GCC 3.2 and 3.3 are very happy with the usage (in a
 header file)


 while 3.4 complains about that semicolon. What I'm asking is A) does
 anyone know if 3.4 has a particular -Wno-extra-semicolon, or
 equivalent, to turn off that warning; or B) what is the proper
 preprocessor metaprogramming technique to silence the warning.


Dave Steffen, Ph.D. "There are two ways to write error-free
Software Engineer IV programs; only the third one works."
Numerica Corporation
ph (970) 419-8343 x27 "Pie are not square. Pie are round.
fax (970) 223-6797 Cornbread are square"
dgsteffen_at_[hidden] ... anon (usenet)
Numerica Disclaimer:
This message and any attachments are intended only for the individual
or entity to which the message is addressed. It is proprietary and
may contain privileged information. If you are neither the intended
recipient nor the agent responsible for delivering the message to the
intended recipient, you are hereby notified that any review,
retransmission, dissemination, or taking of any action in reliance
upon, the information in this communication is strictly prohibited,
and may be unlawful. If you feel you have received this communication
in error, please notify us immediately by returning this Email to the
sender and deleting it from your computer.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at