Deutsch   English   Français   Italiano  
<86o74zmvmw.fsf@linuxsc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.arch
Subject: Re: Computer architects leaving Intel...
Date: Sat, 07 Sep 2024 06:38:31 -0700
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <86o74zmvmw.fsf@linuxsc.com>
References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <vasruo$id3b$1@dont-email.me> <2024Aug30.195831@mips.complang.tuwien.ac.at> <vat5ap$jthk$2@dont-email.me> <vaunhb$vckc$1@dont-email.me> <vautmu$vr5r$1@dont-email.me> <2024Aug31.170347@mips.complang.tuwien.ac.at> <vavpnh$13tj0$2@dont-email.me> <vb00c2$150ia$1@dont-email.me> <505954890d8461c1f4082b1beecd453c@www.novabbs.org> <vb0kh2$12ukk$1@dont-email.me> <vb3smg$1ta6s$1@dont-email.me> <vb4q5o$12ukk$3@dont-email.me> <vb6a16$38aj5$1@dont-email.me> <vb7evj$12ukk$4@dont-email.me> <vb8587$3gq7e$1@dont-email.me> <vb91e7$3o797$1@dont-email.me> <vb9eeh$3q993$1@dont-email.me> <vb9l7k$3r2c6$2@dont-email.me> <vba26l$3te44$1@dont-email.me> <vbag2s$3vhih$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Sat, 07 Sep 2024 15:38:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="15cdd4985ebd3d04d209b9ff3a6e4cfe";
	logging-data="1472649"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/kxDJzGfRlbVaayd8r0jmNw+0m7uoZSh4="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:UqcFewKsaMgmdbZR3T264LoFqSE=
	sha1:v179nB1HiBNvRP9VZ4VeVOGa5FQ=
Bytes: 2478

Brett <ggtgp@yahoo.com> writes:

> I tried using unsigned for a bunch of my data types that should
> never go negative, but every time I would have to compare them
> with an int somewhere and that would cause a compiler warning,
> because the goal was to also remove unsafe code.

What sort of ints?  How many of those were constants?  In which
cases were the int values negative, and which cases non-negative?
More generally, what are the circumstances that prompted you to
compare a can-never-be-negative value to a potentially-negative
value?  Are most of the comparisons relational, or are there
lots of equality/inequality?

There are easy ways to compare (without getting warnings) signed
values and unsigned values, but how a particular case should be
addressed depends on the details.  Can you supply more information?