[klibc] [klibc:master] tests: Add test for malloc size arithmetic
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.
Time is nature's way of making sure that
everything doesn't happen at once.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the klibc