News for hackers. Stuff that matters.
Re:Why Does Calloc Exist? by ainar-g on Sunday November 13, 2022 @03:16AM (#33581092)
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

Re:Why Does Calloc Exist? by kelnos on Sunday November 13, 2022 @04:15AM (#33581397)
> 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.

Re:Why Does Calloc Exist? by someweirdperson on Sunday November 13, 2022 @05:53AM (#33581860)
If it is like overflow, it should indeed be "aroundwrap".
Re:Why Does Calloc Exist? by jwilk on Sunday November 13, 2022 @06:42AM (#33582140)
FWIW, 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

Re:Why Does Calloc Exist? by Dylan16807 on Sunday November 13, 2022 @08:30PM (#33589253)
That's not what the objection is. Your quote is clearly defining a noun.
Re:Why Does Calloc Exist? by Someone on Sunday November 13, 2022 @06:51AM (#33582191)
Verbing weirds language (https://www.gocomics.com/calvinandhobbes/1993/01/25), but in English, you can verb (https://en.wikipedia.org/wiki/Conversion_(word_formation)#Ve...) a lot of phrases.
Re:Why Does Calloc Exist? by gnubison on Sunday November 13, 2022 @11:49AM (#33584778)
Prescriptivism much? :p