Hi Wilco and Adhemerval! On 1/17/23 20:16, Wilco Dijkstra wrote: > Hi, > >> I really won't bother with this interface, since potentially changing it >> might generate more potentially breakage than improvements. > > The typical use-case is rounding up a pointer to align it or increasing a buffer > to be allocated. There is no chance of overflow in these cases since you will > never have pointers that close to SIZE_MAX or get buffers close to the maximum > memory size. And adding saturation would mean we didn't do what was requested > either... > > So it seems best to state it only works on unsigned values (with y > 0 since division > by zero is undefined behaviour of course) and it's implementation defined whether > overflow wraps or saturates. > Thanks! That clarifies what this macro is for. I'll document that. Cheers, Alex > Cheers, > Wilco --