assume, assert, enforce, @safe

Wyatt via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 1 06:46:11 PDT 2014


On Friday, 1 August 2014 at 01:41:40 UTC, Daniel Gibson wrote:
>
> Yep, also a good point.
> (Actually it's 187 -f* options, the rest is -O* which can't be 
> combined of course and some of them most probably imply many of 
> the -f* switches, but it'll still be an unmanageable/untestable 
> amount of possible configurations)
>
Actually, it's much worse than that. ;)  All of the -O switches 
in GCC have a set of -f switches that they enable or disable.  
What they DON'T tell you up front is that set of switches also 
enables other optimisations. [0]  I encountered a situation a 
couple months ago where this actually mattered (i.e. runtime 
segfault) for one particular C file if you built it with levels 
above -O0, but enabling every single -f switch worked fine (still 
not sure why; solved by switching to Clang and it compiles and 
runs at all -O levels with no warnings).

-Wyatt

[0] 
https://gcc.gnu.org/wiki/FAQ#Is_-O1_.28-O2.2C-O3_or_-Os.29_equivalent_to_individual_-foptimization_options.3F


More information about the Digitalmars-d mailing list