
"Dave Steffen" <dgsteffen@numerica.us> wrote
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;
FWIW This compiles fine in VC7.1 . AFAIK there is no C++ rule banning an empty statement in any scope( including namespace scope) where a statement is otherwise allowed. Andy Little