Gcc: force compiler to use unsigned char by default
Since the nature of a char in C++ is compiler-dependent when the unsigned qualifier is not present, is there an argument I could pass on to GCC which would force all char s to be compiled as unsigned ? The flag you are looking for is -funsigned-char . From the documentation : -funsigned-char Let the type char be unsigned, like unsigned char . Each kind of machine has a default for what char should be. It is either like unsigned char by default or like signed char by default. Ideally, a portable program should always use signed char or unsigned char when it depends on the signedness of an