[Bug c++/11633] g++ does not initialize structures when auto-increment variables are used
nathan at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jul 23 09:04:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11633
------- Additional Comments From nathan at gcc dot gnu dot org 2003-07-23 09:04 -------
I beleive the code to be ill formed. Looking at 8.5.1 of the std does not
help. brace enclosed initializer lists can only be used for aggregates. 1.9
talks about sequence points and full-expression. The initializers in an
initializer list are not full-expressions, because they'r part of the initializer.
AFAICT, The comma symbol is only a sequence point when it is the comma-operator
(and does not resolve to an overloaded function!)
I suspect when designtated initializers are used in different C99 compilers,
you'll find the behaviour is not the same across all compilers.
The Defect list does not talk about this case, I will ask the committee.
I would be surprised if the intent is to be anything different from
C90/C99.
nathan
More information about the Gcc-bugs
mailing list