From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A6B733858C2D; Mon, 5 Feb 2024 21:19:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6B733858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707167949; bh=nErtTJ+eHZ4HQiYEOYJmHN67aSQSW2l+8Ze8rw6N4Ds=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ic/HhVTgp1xV8+2CMRnDrahHufp0RgF6S5uCQ+BNoCfECxJGUzfrORzFX9JRt4U+d /PRclalElP6EpsGcJNwMCozP557j5ROQIzVewlXnxb58qNbzaP2DQEc5qd4zP4Gf1H rTJPfwqSVJ9rxSujTIrxh7xUVzb187MdeMzf52nw= From: "simon.marchi at polymtl dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/31331] Wenum-constexpr-conversion should be fixed, soon treated as a hard error Date: Mon, 05 Feb 2024 21:19:08 +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: simon.marchi at polymtl dot ca 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 #22 from Simon Marchi --- (In reply to Carlos Galvez from comment #19) > @Simon Marchi I am not able to reproduce the issue you mention in comment > #4. With the following change, the entire codebase compiles just fine, > including the problematic example of auto x =3D ~STEP_OVER_BREAKPOINT. >=20 > diff --git a/gdbsupport/enum-flags.h b/gdbsupport/enum-flags.h > index 50780043477..21fb4d29abc 100644 > --- a/gdbsupport/enum-flags.h > +++ b/gdbsupport/enum-flags.h > @@ -94,7 +94,7 @@ struct enum_underlying_type > DIAGNOSTIC_PUSH > DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION > typedef typename > - integer_for_size(T (-1) < T (0))>::type > + std::underlying_type::type > type; > DIAGNOSTIC_POP > }; >=20 > What change did you apply that led to that failure? It's the other way around. If you add a `auto x =3D ~STEP_OVER_BREAKPOINT`= to master without any other changes, it doesn't compile. If you then add your std::underlying_type change, then it compiles. --=20 You are receiving this mail because: You are on the CC list for the bug.=