Re:C23 is finished: Here is what is on the menu
by quelsolaar on Friday August 05, 2022 @06:49AM
(#32354259)
These this are much more complicated to define then you think when you consider the kinds of strange hardware C supports, where bytes are not 8 bits and things like that. We tried to get endian-ness conversion functions in to c23 but ran out of time just because defining these functions so that their functionality is clear on non standard hardware is so difficult.
[ Parent
| on HN ]
Re:C23 is finished: Here is what is on the menu
by fanf2 on Friday August 05, 2022 @07:11AM
(#32354445)
It would have been reasonable to define the functions only for the CHAR_BIT == 8 case, and if any implementers that support weird architectures want the functionality let them come forward with a proposal. I got the impression that the people working on the proposal got into an avoidable mess of complications.
Re:C23 is finished: Here is what is on the menu
by quelsolaar on Friday August 05, 2022 @07:29AM
(#32354606)
Given that weird platforms are so dependent on C and since we release versions so infrequent, we try to get it right the first time. Often even defining what is excluded becomes complicated.
Re:C23 is finished: Here is what is on the menu
by cbrogrammer on Friday August 05, 2022 @08:36AM
(#32355201)
if C throws away portability it is no longer C
Re:C23 is finished: Here is what is on the menu
by pjmlp on Friday August 05, 2022 @09:22AM
(#32355739)
C's secret to portability is called #ifdef spaghetti and mostrosities like autoconf.
Re:C23 is finished: Here is what is on the menu
by Bigpet on Friday August 05, 2022 @07:27AM
(#32354584)
oh, I didn't see that byteswap wasn't in there. I googled the "stdc_" part and saw a paper that included byteswap. I guess that was an older draft.
Damn, so close. Well I hope it's included next time.
Re:C23 is finished: Here is what is on the menu
by __phantomderp on Friday August 05, 2022 @02:38PM
(#32360116)
I'll do my best to get ror/rol and byteswap in!