3 ms·
Default signed/unsigned is not a platform convention but a compiler one. You can change it with a compiler switch, in the makefile.
by hasmanean 3y ago
Default signed/unsigned is not a platform convention but a compiler one. You can change it with a compiler switch, in the makefile.
- chmod775 3y agoThen you're better off using custom types - that way people will immediate know your type is non-default - as opposed to hiding your customization away in a makefile, pranking people who expect built-ins to behave a certain way.
- munch117 3y agoThe people who understand that it can be either, depending on a compiler switch, are exactly the people who use an explicit sign (typically via a typedef) to ensure their code always works. The people who say that char is de facto signed and everyone should just deal with it, are the people who end up writing broken code.
- WalterBright 3y agoUm, it was dependent on how the CPU handled it back in those days. That problem went away, though.
- ChrisRR 3y ago"might" be able to change it. It's fine in GCC based compilers, but some awkward/old compilers don't give you the luxury