From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20037 invoked by alias); 6 Aug 2002 23:44:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 20030 invoked from network); 6 Aug 2002 23:44:56 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 6 Aug 2002 23:44:56 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id g76NieW10594; Tue, 6 Aug 2002 16:44:40 -0700 From: david carlton MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15696.24423.155082.756394@jackfruit.Stanford.EDU> Date: Tue, 06 Aug 2002 16:44:00 -0000 To: Kevin Buettner Cc: Andrew Cagney , Michael Snyder , Daniel Jacobowitz , Joel Brobecker , gdb-patches@sources.redhat.com Subject: Re: Question regarding bizarre ',' In-Reply-To: <1020806231458.ZM32372@localhost.localdomain> References: <20020806012134.GC916@gnat.com> <20020806012702.GA15122@nevyn.them.org> <3D4F245F.6EAF1073@redhat.com> <3D4F3261.8030209@ges.redhat.com> <1020806231458.ZM32372@localhost.localdomain> Cc: carlton@math.stanford.edu X-SW-Source: 2002-08/txt/msg00153.txt.bz2 On Tue, 6 Aug 2002 16:14:58 -0700, Kevin Buettner said: > I am unable to find anything in Harbison and Steele which indicates > that a trailing comma is acceptable in an array initializer. (They > don't seem to mention it one way or another.) K&R (second edition, of course) section A8.7 says: The initializer is preceded by =, and is either an expression, or a list of initializers nested in braces. A list may end with a comma, a nicety for neat formatting. It seems to be talking about a general enough context to include arrays and structs, though it's not _entirely_ clear to me; the second example on the top of p. 220 is an array with an extra comma at the end. David Carlton carlton@math.stanford.edu