-fshort-enums

I'd like to include the "-fshort-enums" when building.

Short of recompiling the IDE, does anyone know how to pass an option to the compiler via the IDE?

I just looked at the Makefile (Arduino 015) and there is this line:
CFLAGS = $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA)

Where CEXTRA seems to not be set. So probably you can export that variable to your environment, ant it will be used as a flag for the compiler.

Thanks. I'll give it a spin and see what happens...

No luck. The Arduino IDE doesn't use the makefile.

The code of interest is in Compiler.java / getCommandCompilerCPP method. It's clear there's no way to inject compiler options at that point. I haven't been able to find a pragma or other compiler directive to enable short-enums. :cry:

I'll have to do enums "long hand" unless someone has another suggestion. Any ideas?