Re: [PATCH 0/3] Fix SunCC compiler complaints new in v2.35.0-rc0
- From
René Scharfe <l.s.r@web.de>
- Date
- Jan 11, 2022, 18:36 UTC
- Message-ID
- <c3228d53-5997-d86c-87a5-5861dacde518@web.de>
- In-Reply-To
- <CAFQ2z_M1skVCFYQ-kM5dMVXcUxV-uR+Zf89dKxgc2v1c1tre=A@mail.gmail.com>
Am 11.01.22 um 18:06 schrieb Han-Wen Nienhuys:
Show 15 quoted lines
> On Tue, Jan 11, 2022 at 5:40 PM Ævar Arnfjörð Bjarmason > <avarab@gmail.com> wrote: >> >> This trivial set of patches fixes compiler complaints from SunCC on >> Solaris that are new in v2.35.0-rc0. > > Thanks, looks fine in principle. > > For the switch, maybe the block types should be an enum. Is there > tooling that would detect a missing case in that case, so we could > drop the abort() ? > > For the 0xffffffff constant, there is probably a better symbolic > constant somewhere. Or could we say (1<<64) -1 without causing > overflow?
How about -1?
Or you could initialize min and max to the actual value of the first item instead of to the absolute limits of the data type.
René