Content originally posted in LPCWare by KevinWMatthews on Thu Mar 20 10:40:31 MST 2014
Hello,
I'm running a project in version 6.1.4 and have haven't been able to get the -fsigned-char compiler flag to take effect. I have entered the flag under both MCU C++ Compiler->Miscellaneous->Other Flags and MCU C Compiler->Miscellaneous->Other Flags.
I've been testing this using the following code:
#include <limits.h>
#if CHAR_MIN < 0
#warning( "default char is signed" )
#else
#warning( "default char is unsigned" )
#endif
The "unsigned" warning is shown.
Any ideas on how to force the default value for char to be signed?
Thanks,
-Kevin