public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102440] New: Uinteger Opt/Param but the underlying type is signed Date: Wed, 22 Sep 2021 03:11:30 +0000 [thread overview] Message-ID: <bug-102440-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102440 Bug ID: 102440 Summary: Uinteger Opt/Param but the underlying type is signed Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: linkw at gcc dot gnu.org Target Milestone: --- The UInteger type in Opt/Param declaration can easily confuse people that the variable for this option/parameter is unsigned. But actually the internal implementation uses signed for it, it requires users to add explicit type conversion for some cases, otherwise the bootstrapping fails due to -Werror. I guess the "UInteger" is mainly to restrict the value range of option/parameter. But I think we still can improve it? Like using one anonymous union with uinteger and integer instead of a single integer, then name the corresponding member as signedness? File this as Segher's suggestion from patch reviewing.
next reply other threads:[~2021-09-22 3:11 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-22 3:11 linkw at gcc dot gnu.org [this message] 2021-09-22 3:13 ` [Bug middle-end/102440] " linkw at gcc dot gnu.org 2021-09-22 5:47 ` [Bug other/102440] " pinskia at gcc dot gnu.org 2021-09-23 6:23 ` linkw at gcc dot gnu.org 2021-09-27 13:29 ` marxin at gcc dot gnu.org 2021-10-25 15:00 ` marxin at gcc dot gnu.org 2021-10-25 20:53 ` segher at gcc dot gnu.org 2021-10-25 21:14 ` segher at gcc dot gnu.org 2021-10-26 15:17 ` marxin at gcc dot gnu.org 2021-10-26 16:45 ` segher 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-102440-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).