This all what they put under "quality of the implementation", so this is not mandatory.
-
-
We should always keep in mind that a "valid" but "low-quality" impl. is free to only compile one fixed program.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @ch3root
That doesn't catch it, I think. Oldish segmented platforms could have 16 bit size_t and larger dynamic allocs
1 reply 0 retweets 0 likes -
No, if your seg'd arch has 16-bit size_t, you can't have individual allocations >64k, just larger total mem.
2 replies 0 retweets 0 likes -
Replying to @RichFelker @ch3root
I don't see where this would be required. size_t is defined via sizeof.
1 reply 0 retweets 0 likes -
Specification of lib functions. E.g. strlen is specified to return length, not "length, converted to size_t".
1 reply 0 retweets 0 likes -
If you want to just say it's UB or unspecified result if it doesn't fit, that's even more awful and unusable.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @gustedt
Sure it's UB. In the same way as printf of >INT_MAX chars.
1 reply 0 retweets 0 likes -
Only way you can claim it's UB is by omission of a clear statement what happens. In any case, unusably bad impl.
1 reply 0 retweets 1 like -
This is very different from printf >INT_MAX, since there's no conceptual upper bound on printf output length.
2 replies 0 retweets 0 likes
printf having unrepresentable lengths that are errors is inevitable, but if strlen has them it's purely bad impl
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.