From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D8FC3858407; Wed, 7 Feb 2024 20:47:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D8FC3858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707338829; bh=Qhu2R/HBUOL71IG7vjZXHE2aiUHDREaH6EQqqBbTW6o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QbaI/28fH5n1oHY2hCoKKl2kr6tstPOSH13vZSsfNXKKdDB1jzmI80mJULxzN7jWe jAyxDJujCjEh51mPjS4Nu+/+3XOE0ayGcMYHUrrWH6EbPLOmsWPdEdRuQXpaLdOkUF mm/UiVRONvhqNqMFrjDZy4BlkhKC2L0pv910EsN0= From: "carlosgalvezp at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/31331] Wenum-constexpr-conversion should be fixed, soon treated as a hard error Date: Wed, 07 Feb 2024 20:47:07 +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: carlosgalvezp at gmail dot com 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 #24 from Carlos Galvez --- It we want to keep the current behavior, I believe it would be possible to create one more trait like "WillEnumBePromotedToSignedInt" that checks exa= ctly that, regardless of the underlying type of the enum. See example: https://godbolt.org/z/38Ev5d1ja So operator~ would be SFINAE-enabled only if both a) enum is unsigned and b) enum won't be promoted to signed int. What do you think? --=20 You are receiving this mail because: You are on the CC list for the bug.=