From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E8EE385AC25; Wed, 1 Sep 2021 17:53:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E8EE385AC25 From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/102164] New: -Wtype-limits warnings in ada.h Date: Wed, 01 Sep 2021 17:53:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Wed, 01 Sep 2021 17:53:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102164 Bug ID: 102164 Summary: -Wtype-limits warnings in ada.h Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Recent Ada builds have been showing a number of -Wtype-limits warnings, all pointing to invocations of the same macro (below). The warnings don't cause the build to fail but it would be nice to avoid them just the same. Maybe = by casting the operands to signed if all their values are in range? In file included from /src/gcc/master/gcc/ada/gcc-interface/decl.c:39: ada/einfo.h: In function =E2=80=98B Is_Void_Or_Type(E)=E2=80=99: /src/gcc/master/gcc/ada/gcc-interface/ada.h:70:13: warning: comparison of unsigned expression >=3D 0 is always true [-Wtype-limits] (((VALUE) >=3D (SUBTYPE) CAT (SUBTYPE,__First)) \ ada/einfo.h:1775:13: note: in expansion of macro =E2=80=98IN=E2=80=99 { return IN (Ekind (Id), Void_Or_Type_Kind); } ^~=