From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4939 invoked by alias); 21 May 2010 23:32:54 -0000 Received: (qmail 4930 invoked by uid 22791); 21 May 2010 23:32:53 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 May 2010 23:32:48 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o4LNWVMv093856 ; Sat, 22 May 2010 01:32:31 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o4LNWVXm055781 ; Sat, 22 May 2010 01:32:31 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o4LNWU4m032858 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Sat, 22 May 2010 01:32:30 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Cc: References: <38685.0063725889$1274473713@news.gmane.org> In-Reply-To: Subject: RE: [RFA] dwarf2read.c: Avoid complaint for char array of unspecified size Date: Fri, 21 May 2010 23:55:00 -0000 Message-ID: <002201caf93d$e6ea8190$b4bf84b0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00524.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Tom Tromey > Envoy=E9=A0: Friday, May 21, 2010 11:43 PM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFA] dwarf2read.c: Avoid complaint for char array of > unspecified size >=20 > >>>>> "Pierre" =3D=3D Pierre Muller > writes: >=20 > Pierre> This code: > Pierre> external char gdbint []; > Pierre> generated a DW_TAG_subrange_type with zero attributes > Pierre> to describe the `[]' part. > Pierre> (compiled with gcc (Debian 4.3.2-1.1) 4.3.2.). >=20 > I think this kind of DIE is explicitly ok, according to DWARF. > See the paragraph toward the end of section 5.11 that describes what to > do when a DW_TAG_subrange_type has no basis type. For dwarf2, in it on 5.10, page number 47 (49 of pdf file). If I understand this correctly, without anything it should be a subrange of type "singed integer" having the same size as an address for that target machine. This is not exactly what is done in the Irix code I modified... But I still don't get the bounds that we should use: lower bound is 0, or 1 for fortran (default value), but should upper bound be equal to lower bound or lower bound -1? > So, I think this complaint is incorrect. It would be better to simply > remove it. This would mean that we should fix the code inside read_subrange_type, no? Do you think that this would be the correct approach? Pierre