From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38601 invoked by alias); 9 Dec 2016 13:00:46 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 38513 invoked by uid 89); 9 Dec 2016 13:00:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=BAYES_05,SPF_PASS autolearn=ham version=3.3.2 spammy=allen, Allen, todd, Todd X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Dec 2016 13:00:35 +0000 Message-ID: <1481288408.14558.20.camel@klomp.org> Subject: Re: [PATCH] DWARF: make signedness explicit for enumerator const values From: Mark Wielaard To: Pierre-Marie de Rodat Cc: Eric Botcazou , gcc-patches@gcc.gnu.org Date: Fri, 09 Dec 2016 13:00:00 -0000 In-Reply-To: <21ef1b1d-ca1e-4881-c51a-e48ee046ea68@adacore.com> References: <20161013161201.10521-1-derodat@adacore.com> <1478781484.14569.131.camel@klomp.org> <4650aad8-9d49-3924-ffb2-77c42e19e870@adacore.com> <1479125116.14569.234.camel@klomp.org> <3aafd2e8-720a-8cb9-21f6-a718966c7e38@adacore.com> <21ef1b1d-ca1e-4881-c51a-e48ee046ea68@adacore.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 X-Spam-Score: -5.8 (-----) X-SW-Source: 2016-12/txt/msg00782.txt.bz2 On Fri, 2016-12-09 at 12:59 +0100, Pierre-Marie de Rodat wrote: > There seems to be only two legal DWARF alternatives to solve this issue: > one is to add a DW_AT_type attribute to DW_TAG_enumerator_type DIEs to > make it point to a base type that specifies the signedness. The other > is to make sure the form of the DW_AT_const_value attribute carries the > signedness information. BTW. I think it should also be possible to simply attach a DW_AT_encoding directly to the DW_TAG_enumeration_type. It seems a simple oversight that option isn't listed in the current DWARF spec. I filed an issue about it: http://dwarfstd.org/ShowIssue.php?issue=3D161130.2 I haven't heard back from the committee. But Todd Allen from Concurrent said their Ada compiler already does this when generating DWARF Cheers, Mark