[Bug 20] volatile introduces new scope
Thomas Kuehne
thomas-dloop at kuehne.cn
Mon Mar 6 11:21:40 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-03-06:
> All runtime control statements of this kind introduce a scope. What bit of the
> spec states that volatile is any different?
The current documentation states:
# VolatileStatement: volatile Statement
That is "Statement" instead of "BlockStatement" - thus not necessarily a
new scope.
Either I'm missing something - if you know, pleace quote - or the
scoping of a few "*Statement"s looks fishy:
# IfStatement: if ( IfCondition ) ThenStatement
# IfStatement: if ( IfCondition ) ThenStatement else ElseStatement
# ElseStatement: Statement
# ThenStatement: Statement
# if(true)
# int i=2;
#
# assert(i == 2); // according to the docs: legal
A quick search for "Statement" and "scope" didn't return any usefull
hits.
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFEDJlJ3w+/yD4P9tIRAtTTAKC2IvC45LJYuspT4aXRIGytNUtJegCfevFn
7qwwLMc6VYmeRLKl7GgbCSM=
=0PXJ
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list