[HN Gopher] How I think about C99 strict aliasing rules
___________________________________________________________________
How I think about C99 strict aliasing rules
Author : bwidlar
Score : 9 points
Date : 2022-05-24 18:28 UTC (4 hours ago)
(HTM) web link (alanwu.space)
(TXT) w3m dump (alanwu.space)
| mort96 wrote:
| Why was the "How" removed from the title? "How I think about C99
| strict aliasing rules" is surely much more appropriate?
| dang wrote:
| Yes, HN's title truncator is overzealous sometimes. We've
| recapitated the title above.
| sylware wrote:
| Beyond this, one thing I have been putting thoughts into is
| removing integer promotion and the implicit casts (except for
| void*) and use explicit static/dynamic casts (not with the
| horrible c++ syntax). I also thought about static and dynamic
| consts, but if I understood well, constant folding would be one
| of the easiest optimizations to do, then that would not be worth
| it. I still wonder what typedef/typeof/_Generic are doing into C.
| They may be "cheap" to implement, but could lead to excessive
| generalizations with a strong smell of Rube Goldberg Machine
| (happening in the linux kernel).
| spacechild1 wrote:
| typedef has been there since at least C89... the only
| alternative is #define - how is that better?
___________________________________________________________________
(page generated 2022-05-24 23:02 UTC)