Re:Porting to GCC 14: C language issues
by WalterBright on Tuesday February 20, 2024 @02:33AM
(#39438853)
When the first C++ Standard (C89) was being created, about half the compilers implemented "sign preserving" semantics, which is what you're advocating, and the other half implemented "value preserving" semantics.
A great battle ensued, and many champions were slain.
The value preserving folks carried the field, and the sign preserving folks changed their compilers.
You would think casting something as signed or unsigned wouldn't promote to a int / unsigned int. Ditto for const and unconst.