Re:Porting to GCC 14: C language issues
by garaetjjte on Monday February 19, 2024 @12:56PM
(#39432662)
int being originally native word size is the reason for weird integer promotion rules.
[ Parent
| on HN ]
Re:Porting to GCC 14: C language issues
by flohofwoe on Tuesday February 20, 2024 @06:08AM
(#39439918)
IMHO it's only weird because the promotion is to 32-bit integers on 64-bit platforms. If all math would happen on the natural word size (e.g. 64-bits), and specific integer widths would only matter for memory loads/stores, it would be fine.