From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B84103858C78; Mon, 17 Apr 2023 05:16:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B84103858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681708619; bh=aaeB84cz+nxjEorcXhUJqunM0Ae3I/hLcD8EORBNVkk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vQa2cTdCYeLRKrD2zPFllSZFuvx5lVxtSa5a2jTi7+otWdbE9bHpXqsrRiz+HYuNH VTrkAGI4AQdGTVPhU+6agowxErilImEAZn8EoQM1DfduI9gJBS2YGOyntmyMmNMTws Y/eoq0D59Sx5T6Nq0cLf+rhOIx2NHQfACRTciOLQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/109532] -fshort-enums does not pick smallest underlying type for scoped enum Date: Mon, 17 Apr 2023 05:16:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109532 --- Comment #2 from Andrew Pinski --- (In reply to Andrew Pinski from comment #1) > That is because a scopped enum has an underlying type of int if not suppl= ied. >=20 > From [dcl.enum]/5: > For a scoped enumeration type, the underlying type is int if it is not > explicitly specified. I should say this is from the C++ standard there. -fshort-enums does not change the language, only ABI.=