Go Down

Topic: -fshort-enums (Read 1 time) previous topic - next topic

Coding Badly

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:

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.

Coding Badly

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

Coding Badly

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.   :'(

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

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131