I asked about this elsewhere with no response, so I gather it can't be done yet.
Since this part of the forum is for "mods to the IDE" I suggest this:
Make the compiler flags configurable (eg. an entry in preferences.txt). That way you can ramp up warning levels, change the optimization amount, and do other similar and useful things.
The default could be the current behaviour, but this part could be modified:
-g -Os -w -fno-exceptions -ffunction-sections -fdata-sections
For example, you might want to enable exceptions, or change to -O3 or something. Certainly you might want more warnings.