From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2754 invoked by alias); 6 Aug 2002 23:15:14 -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 2739 invoked from network); 6 Aug 2002 23:15:12 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 6 Aug 2002 23:15:12 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g76N2Dl13949 for ; Tue, 6 Aug 2002 19:02:13 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g76NF9u15997; Tue, 6 Aug 2002 19:15:09 -0400 Received: from romulus.sfbay.redhat.com (IDENT:9wq0AMKec2NxGcjSYoE2iwa929EUq31k@romulus.sfbay.redhat.com [172.16.27.251]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g76NF5e22943; Tue, 6 Aug 2002 16:15:05 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g76NEw332373; Tue, 6 Aug 2002 16:14:58 -0700 Date: Tue, 06 Aug 2002 16:15:00 -0000 From: Kevin Buettner Message-Id: <1020806231458.ZM32372@localhost.localdomain> In-Reply-To: Andrew Cagney "Re: Question regarding bizarre ','" (Aug 5, 10:20pm) References: <20020806012134.GC916@gnat.com> <20020806012702.GA15122@nevyn.them.org> <3D4F245F.6EAF1073@redhat.com> <3D4F3261.8030209@ges.redhat.com> To: Andrew Cagney , Michael Snyder Subject: Re: Question regarding bizarre ',' Cc: Daniel Jacobowitz , Joel Brobecker , gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-08/txt/msg00151.txt.bz2 On Aug 5, 10:20pm, Andrew Cagney wrote: > > By most compilers, but some (possibly deviant ones) will give you > > an error, or at least a warning. I have definitely encountered this > > when building GDB, and I think most array and enum initializers in > > gdb do not have the trailing comma for this reason. > > This is true of enums (cf the alpha compiler) but not, I believe, of > array initializers. 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.) I recall using some compilers in the past where a trailing comma in an array initializer was definitely not accepted. In fact, I was told at the time that some code I had written which had a trailing comma was not standards compliant. Kevin