4 ms·
The current C2x (aka C23) draft finally spells the behaviour out explicitly: > 7.24.3.2 The calloc function > […] > Returns > The calloc function returns ei
by ainar-g 4y ago
The current C2x (aka C23) draft finally spells the behaviour out explicitly:
> 7.24.3.2 The calloc function
> […]
> Returns
> The calloc function returns either a pointer to the allocated space or a null pointer if the space
cannot be allocated or if the product nmemb * size would wraparound size_t.
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3054.pdf https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3054.pdf
- kelnos 4y ago> if the product nmemb * size would wraparound size_t. Gah! "Wraparound" is not a verb! You'd think someone writing a computer language specification would try to use (human) language correctly.
- jwilk 4y agoFWIW, it's a technical term defined as: > the process by which a value is reduced modulo 2ᴺ, where N is the width of the resulting type
- Dylan16807 4y agoThat's not what the objection is. Your quote is clearly defining a noun.
- someweirdperson 4y agoIf it is like overflow, it should indeed be "aroundwrap".
- Someone 4y agoVerbing weirds language (https://www.gocomics.com/calvinandhobbes/1993/01/25 https://www.gocomics.com/calvinandhobbes/1993/01/25), but in English, you can verb (https://en.wikipedia.org/wiki/Conversion_(word_formation)#Verbing https://en.wikipedia.org/wiki/Conversion_(word_formation)#Ve...) a lot of phrases.
- gnubison 4y agoPrescriptivism much? :p