public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-102164-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102164 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 ‘B Is_Void_Or_Type(E)’: /src/gcc/master/gcc/ada/gcc-interface/ada.h:70:13: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] (((VALUE) >= (SUBTYPE) CAT (SUBTYPE,__First)) \ ada/einfo.h:1775:13: note: in expansion of macro ‘IN’ { return IN (Ekind (Id), Void_Or_Type_Kind); } ^~
next reply other threads:[~2021-09-01 17:53 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-01 17:53 msebor at gcc dot gnu.org [this message] 2023-05-11 16:32 ` [Bug ada/102164] " ebotcazou at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-102164-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).