From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 825DF3858403; Sat, 3 Feb 2024 21:14:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 825DF3858403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706994887; bh=8O95fjqDSTYQRIpNSgpANHS3YbXQ2JQMBK8WjMp2i7c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nyu6v+nPZpO7qnDPF0lZ5HeUBUYw/NP3uBoIKW+n/WbstrylyNB6OqDrr56Yhx5NO r3+Zv6KJEBisv/HZXzozk1NNAPx6wJ4YfON7S8kgWQXZEB23tEhujKhR7m8GEpZfws H/yid+EFz1q9cuirw0U6rIEWOherHqrUbw2CAd3c= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/31331] Wenum-constexpr-conversion should be fixed, soon treated as a hard error Date: Sat, 03 Feb 2024 21:14:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31331 --- Comment #2 from Tom Tromey --- I changed enum-flags.h to use std::underlying_type, with the idea that if there were any errors, I'd simply change the base enum to use an unsigned type. (I tried auditing the existing uses by hand but I lost interest partway through.) Anyway to my surprise, the only compilation issues were in the enum-flags unit-tests, in a section that's explicitly commented as being unimportant. This is in fact the 'CHECK_VALID' call that's pointed out in the above-linked commit message. However, that case tests something that I think is very weird, code of the form: auto var =3D cond ? enum_1 : enum_2; I find it pretty unlikely that this code appears anywhere in gdb, or that we'd want it to. --=20 You are receiving this mail because: You are on the CC list for the bug.=