From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6B29E3858C3A; Mon, 25 Oct 2021 20:53:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B29E3858C3A From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/102440] Uinteger Opt/Param but the underlying type is signed Date: Mon, 25 Oct 2021 20:53:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: internal-improvement X-Bugzilla-Severity: enhancement X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 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: Mon, 25 Oct 2021 20:53:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102440 --- Comment #6 from Segher Boessenkool --- (In reply to Martin Li=C5=A1ka from comment #5) > All right, so the meaning of the UInteger type is actually that users can= 't > set the flag/param to a negative value: >=20 > $ gcc -fabi-version=3D-3 a.c > gcc: error: argument to '-fabi-version=3D' should be a non-negative integ= er That doesn't contradict using it with an "unsigned int". > Plus there are very many flags that are initialized to -1 with Init(-1). = The > special value is used for distinguishing between a set value and the defa= ult > one. That doesn't contradict using it with an "unsigned int". > So the name is unfortunate, but I don't see what can we do about it? We could make the "UInteger" type mean it is implemented with an "unsigned = int" C type (or some other unsigned integer type).=