From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4407 invoked by alias); 23 Jul 2003 09:04:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4285 invoked by uid 48); 23 Jul 2003 09:04:16 -0000 Date: Wed, 23 Jul 2003 09:04:00 -0000 Message-ID: <20030723090416.4284.qmail@sources.redhat.com> From: "nathan at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030722205341.11633.msimons@simons-clan.com> References: <20030722205341.11633.msimons@simons-clan.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/11633] g++ does not initialize structures when auto-increment variables are used X-Bugzilla-Reason: CC X-SW-Source: 2003-07/txt/msg02688.txt.bz2 List-Id: 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