From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10861 invoked by alias); 24 Dec 2019 21:51:33 -0000 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 Received: (qmail 10853 invoked by uid 89); 24 Dec 2019 21:51:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-5.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=int=e2, HContent-Transfer-Encoding:8bit?= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Dec 2019 21:51:31 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 767001E4A4; Tue, 24 Dec 2019 16:51:29 -0500 (EST) Subject: Re: Current master fails to build on i686-pc-linux-gnu To: Ruslan Kabatsayev , GDB Patches , tankut.baris.aktemur@intel.com References: From: Simon Marchi Message-ID: <63b57288-985e-e09f-0449-e312b5cc6b62@simark.ca> Date: Tue, 24 Dec 2019 21:51:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-12/txt/msg01002.txt.bz2 On 2019-12-24 3:44 p.m., Ruslan Kabatsayev wrote: > Hello, > > Building current master of binutils-gdb (commit ebd1c6d1d30; git-blame > points to commits e35000a7f8be and d0922fcf02c6) results in some > -Werror=format= errors on i686-pc-linux-gnu: > > In file included from dwarf2read.c:47:0: > dwarf2read.c: In function ‘bool is_valid_DW_AT_defaulted(ULONGEST)’: > complaints.h:38:40: error: format ‘%lu’ expects argument of type ‘long > unsigned int’, but argument 2 has type ‘ULONGEST {aka long long > unsigned int}’ [-Werror=format=] > complaint_internal (FMT, ##__VA_ARGS__); \ > ^ > dwarf2read.c:15490:3: note: in expansion of macro ‘complaint’ > complaint (_("unrecognized DW_AT_defaulted value (%lu)"), value); > ^~~~~~~~~ > dwarf2read.c: In function ‘bool > is_valid_DW_AT_calling_convention_for_type(ULONGEST)’: > complaints.h:38:40: error: format ‘%lu’ expects argument of type ‘long > unsigned int’, but argument 2 has type ‘ULONGEST {aka long long > unsigned int}’ [-Werror=format=] > complaint_internal (FMT, ##__VA_ARGS__); \ > ^ > dwarf2read.c:15869:7: note: in expansion of macro ‘complaint’ > complaint (_("unrecognized DW_AT_calling_convention value " > ^~~~~~~~~ > dwarf2read.c: In function ‘bool > is_valid_DW_AT_calling_convention_for_subroutine(ULONGEST)’: > complaints.h:38:40: error: format ‘%lu’ expects argument of type ‘long > unsigned int’, but argument 2 has type ‘ULONGEST {aka long long > unsigned int}’ [-Werror=format=] > complaint_internal (FMT, ##__VA_ARGS__); \ > ^ > dwarf2read.c:15895:7: note: in expansion of macro ‘complaint’ > complaint (_("unrecognized DW_AT_calling_convention value " > ^~~~~~~~~ > > Regards, > Ruslan Sorry about that, I failed to catch it during review. The fix is simple, these should use pulongest (value) with the format specifier "%s". I don't really have time right now to fix it. If you'd like to make a patch, please go ahead and push it. Simon