
"David Abrahams" <dave@boost-consulting.com> wrote in message news:ufyubyn3x.fsf@boost-consulting.com...
"Andy Little" <andy@servocomm.freeserve.co.uk> writes:
"Andy Little" <andy@servocomm.freeserve.co.uk> wrote
"David Abrahams" <dave@boost-consulting.com> wrote
"Andy Little" <andy@servocomm.freeserve.co.uk> writes:
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.
But that's just it: statements aren't allowed at namespace scope.
Thats not correct. A declaration-statement is a statement.
However I assume what you are trying to say is ; if statements allowed at namespace scope cannot be empty then by deduction semicolons representing empty statements are not permitted at namespace scope.
Oops sorry for trying to put words in someone elses mouth.
I didn't mind. I don't know what I was trying to say. I obviously don't remember how the grammar works; I thought statements strictly appeared at function scope.
Actually I now think that you are correct and I am wrong , because statements only appear on the rhs of the production within expressions. Therefore the statement suffix on declaration-statement indicates a declaration within an expression,whereas outside it is simply a declaration. Sorry for the confusion. Andy Little