From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AEE03384B806; Thu, 6 Aug 2020 15:33:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEE03384B806 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596728007; bh=SscgwBnHDQOA0A1cWq1CPuFo6zsypay8HrXDPioMYu8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UdYdKQRHW9O6oMFxNYAH0jlfoo9WQO1mj8ju3ufsqww5KBiJ4tBshX2jqqT2JKqT6 laTTKiN4rmgcciTJ63dOXaGKOiCnVWHEZU3UI/Mzr13ifc1Bk2OeD6AO2jB8jy1kfj qm4/CYANsXGrCc2WHjq1nQ4790jYFhSPRbxE6W84= From: "fw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96500] enum of underlying type bool does not accept enumerators with integer constant values other than 0 and 1 Date: Thu, 06 Aug 2020 15:33:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: fw at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2020 15:33:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96500 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Florian Weimer --- I was wrong, conversions from int to bool are supposed to be narrowing, and= Two + 1 has type int, and getting from there to bool is not permitted in a converted constant expression. I still have some concerns about narrowing conversions to bool, but those a= re independent of the enum issue.=