
Arkadiy Vertleyb writes:
Hi all,
Not having extra semicolons is one of the strongest arguments against incuding a trailing semicolon into a statement-generating macro. Can anybody explain why having an extra semicolon is considered a potential problem by some compilers? Isn't null as good as any other number? Shouldn't an empty statement be considered as good as any other statement?
Ths issue is IIRC and AFAIK macros that are used outside of any statement blocks, i.e. the thing David Abrahams suggested that spawned this whole thread. Something like a macro that declares or defines a function: #define MAKEFOO inline void foo () { ... } and then simply used as: (... other inline functions, for example ...) MAKEFOO; The point is that after macro expansion, that semicolon I put in after the macro invocation isn't valid, because I'm not allowed to have a null statement (or any other kind of statement) at this point in the file. The presence or absence of that semicolon is what the fuss has been about. :-) ---------------------------------------------------------------------- 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@numerica.us ... 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.