Regarding compiler switches

bearophile bearophileHUGS at lycos.com
Thu Nov 5 03:54:37 PST 2009


Lars T. Kyllingstad:

> Is there any good reason for NOT letting people choose these things for 
> themselves? I suspect it would be very easy to add more detailed options 
> to DMD:
> 
>    --bounds-checking=on|off
>    --mem-safe=on|off
>    --Oxxx=on|off|auto  (There are many possible optimisations, and the
>                        compiler doesn't always know best.)
>    --contracts=on|off

LDC has:
  -enable-asserts                              - (*) Enable assertions
  -enable-boundscheck                          - (*) Enable array bounds checks
  -enable-contracts                            - (*) Enable function pre- and post-conditions

Options marked with (*) also have a -disable-FOO variant with inverted

Bye,
bearophile



More information about the Digitalmars-d mailing list