In http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0065d/Cihejcda.html there is an option and a note:
Enum container always int
Select this option to force all enumerations to be stored in integers. By default, the compiler uses the smallest data type that can hold all values in an enum.
Note
This option is not recommended for general use and is not required for ANSI-compatible source. If used incorrectly, this option can cause errors in the resulting image.
What is an example in C of such an incorrect use?
Background:
I'm developing an embedded application in C an removing this compiler flag fixed an error (or only the symptoms of another error). The error was an
sprintf(big_enought_char_array, "%4.1f", float_var)
function call wasn't correctly formatting floats.
This was almost fixed by using the right alignment for the memory used as stack. "Almost" fixed because the content of the array was ok, but the decimal point had the wrong char. Removing the compiler option mentioned above fixed the problem. So the question is what is this compiler option doing exactly and what is an incorrect use of it?