[klibc] [klibc:master] tests: Add test for malloc size arithmetic
Ben Hutchings
ben at decadent.org.uk
Sat May 1 11:51:16 PDT 2021
On Sat, 2021-05-01 at 17:06 +0000, Thorsten Glaser wrote:
> Ben Hutchings dixit:
>
> > On Fri, 2021-04-30 at 23:29 +0000, Thorsten Glaser wrote:
> > > klibc-bot for Ben Hutchings dixit:
> > >
> > > > +#if SIZE_MAX > 0x100000000
> > >
> > > Are you sure about this? No ULL suffix or anything?
> >
> > What are you worried about?
>
> That this is equivalent to #if SIZE_MAX > 0 on 32-bit platforms,
> nullifying the effect.
Maybe in C90. But we require (at least) C99 with some GNU extensions,
so preprocessor expressions use (at least) 64-bit integers.
Ben.
--
Ben Hutchings
Time is nature's way of making sure that
everything doesn't happen at once.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zytor.com/archives/klibc/attachments/20210501/387e72ba/attachment.sig>
More information about the klibc
mailing list