> int i = i;
According to section 6.2.1 paragraph 7 of the C99 specification, a local
variable declaration "has scope that begins just after the completion of
its declarator."
According to section 6.7 paragraph 1 of the same specification, The
declarator includes just the "int i" part of the above code fragment.
The initializer after the equals sign is not part of the declarator:
init-declarator:
declarator
declarator = initializer
Based on the above, I assert that the inner local variable is already in
scope by the time its initializer is being processed. Hence, you are
initializing the inner local variable with itself, not with the value of
the same-named outer local variable.
Anybody have a contrary reading of the specification?
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
CIL-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cil-users