From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id E693B3858C52 for ; Wed, 22 Nov 2023 14:25:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E693B3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E693B3858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:67c:2178:6::1c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700663160; cv=none; b=cuj0MkzYg7sLVw2ZdEuUkLWuImbh2jYVcunmg6nyX4JaG/l7ob2jBuyLD4tFsMK421F8kTPs1Bs9B9zwyJnJZG/s9hjOkq5C7TXBRDQKlvzOs83TQago7eR26Wnz2E3SENI7GgFCQGIQfTvoB412tVzFlta1shbv5UJvVThOxsY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700663160; c=relaxed/simple; bh=1CoQtOohGr9bQqsUX/drBhD7ci0uiBjiK5SdV/HiXLc=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=dP2qTqsT+PI86BRAY+l3ATQ1i6+BHujTqapwzkuBtJQ4x2kToCpDRA2TucB/DkeFN5Ney+4N9Q3auFzeIOOfvaPAHyboqeCZXR5LR/Ogtamn6LzIetgz4weiecsyipZh+4w3aGdl3Qc0bgdujpu6qUg/M0gXzhtph23kM+6yxeU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1A99321904; Wed, 22 Nov 2023 14:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1700663156; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=isVZPH14nW5fhpWcni/mb6xyZvSswHHKmA6IEaS79IA=; b=OBmBbO7SCCunGV7SYr4B5f/3XaWNqklloM7CtPWHX4/MaJ/Bgue2sK8qvw89oUED0Z5cdq OdYgiILq+9SHUGwmko2rolSzivNS9y8upHNppWAT1sdcPfBUu+nm8EvrzZ29ruQyjjV8yG nrwssU9HmIA9ogxcnQliwCkk8CVERxY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1700663156; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=isVZPH14nW5fhpWcni/mb6xyZvSswHHKmA6IEaS79IA=; b=h/hSN1HhZICp05xVODr1UNYZjbz9p8byd5stoOFzYy4JoALkDBlXFS0Z5i5kAOV9ArSf7k 1Na9vdKRwFd/lWDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EEFC813461; Wed, 22 Nov 2023 14:25:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6/QkOXMPXmVPBwAAMHmgww (envelope-from ); Wed, 22 Nov 2023 14:25:55 +0000 Message-ID: <4d6a5f51-eb17-4de4-9c9f-df6a487ee9a1@suse.de> Date: Wed, 22 Nov 2023 15:27:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fix build with GCC 7.5 Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20231122140310.861086-1-tromey@adacore.com> From: Tom de Vries In-Reply-To: <20231122140310.861086-1-tromey@adacore.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -2.95 X-Spamd-Result: default: False [-2.95 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-1.66)[92.89%]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/22/23 15:03, Tom Tromey wrote: > A recent change to 'struct field' caused a build failure with GCC > 7.5.0, as reported by Tom de Vries: > > /data/vries/gdb/src/gdb/gdbtypes.h:721:51: error: > ‘field::m_accessibility’ is too small to hold all values of ‘enum > class accessibility’ [-Werror] > ENUM_BITFIELD (accessibility) m_accessibility : 2; > ^ > > Mark Wielaard pointed out that this was a GCC bug: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51242 > > This patch works around the bug by changing this member not to be a > bitfield. It reduces the size of the enum a bit instead. I also > changed m_bitsize to no longer be a bitfield -- that was done for > packing reasons in ancient times, but with m_accessibility not being a > bitfield, this no longer matters. > > This patch does not change the size of struct field on 64-bit hosts. Hi, thanks for looking into this. This fixes one of the three warnings. But I still get: ... /data/vries/gdb/src/gdb/gdbtypes.h:1616:49: error: ‘fn_field::accessibility’ is too small to hold all values of ‘enum class accessibility’ [-Werror] ENUM_BITFIELD (accessibility) accessibility : 2; ^ /data/vries/gdb/src/gdb/gdbtypes.h:1662:49: error: ‘decl_field::accessibility’ is too small to hold all values of ‘enum class accessibility’ [-Werror] ENUM_BITFIELD (accessibility) accessibility : 2; ^ ... Thanks, - Tom