From 163c8dbf92f7cbcc163cbcd52eff670ad05e5ba3 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 4 Dec 2014 08:28:13 +0100 Subject: [PATCH] tweaked default compiler options --- src/ce_dmdwrap.pas | 3 ++- src/ce_project.pas | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ce_dmdwrap.pas b/src/ce_dmdwrap.pas index fbb3932d..b2621c57 100644 --- a/src/ce_dmdwrap.pas +++ b/src/ce_dmdwrap.pas @@ -150,7 +150,7 @@ type property binaryKind: TBinaryKind read fBinKind write setBinKind default executable; property inlining: boolean read fInline write setInline default false; property noBoundsCheck: boolean read fNoBounds write setNoBounds; - property boundsCheck: TBoundCheckKind read fBoundsCheck write setBoundsCheck; + property boundsCheck: TBoundCheckKind read fBoundsCheck write setBoundsCheck default safeOnly; property optimizations: boolean read fOptimz write setOptims default false; property generateStackFrame: boolean read fGenStack write setGenStack default false; property addMain: boolean read fMain write setMain default false; @@ -544,6 +544,7 @@ end; constructor TOutputOpts.create; begin fVerIds := TStringList.Create; + fBoundsCheck := safeOnly; end; destructor TOutputOpts.destroy; diff --git a/src/ce_project.pas b/src/ce_project.pas index 590a1bdf..f518f245 100644 --- a/src/ce_project.pas +++ b/src/ce_project.pas @@ -90,7 +90,7 @@ type implementation uses - ce_interfaces, controls, dialogs, ce_symstring, ce_libman, ce_main; + ce_interfaces, controls, dialogs, ce_symstring, ce_libman, ce_main, ce_dcd; constructor TCEProject.create(aOwner: TComponent); begin @@ -277,11 +277,13 @@ begin Name := 'debug'; debugingOptions.debug := true; debugingOptions.addCInformations := true; + outputOptions.boundsCheck := onAlways; end; with TCompilerConfiguration(fOptsColl.Add) do begin Name := 'unittest'; outputOptions.unittest := true; + outputOptions.boundsCheck := onAlways; end; with TCompilerConfiguration(fOptsColl.Add) do begin