June 12, 2004 volatile inconsistency | ||||
---|---|---|---|---|
| ||||
for(int i = 0; i < 10000000; ) { volatile ++i; } is legal for(int i = 0; i < 10000000; volatile ++i) { } is not |
July 06, 2004 Re: volatile inconsistency | ||||
---|---|---|---|---|
| ||||
Posted in reply to The Dr ... who? | "The Dr ... who?" <matthew.hat@stlsoft.dot.org> wrote in message news:cae9ab$12md$1@digitaldaemon.com... > for(int i = 0; i < 10000000; ) > { > volatile ++i; > } > > is legal > > for(int i = 0; i < 10000000; volatile ++i) > { > } > > is not That's correct. Volatile is the start of a statement, the third part of a for statement is an expression, not a statement. |
Copyright © 1999-2021 by the D Language Foundation