From b3f597009e59745b4c738f647069f763eef64173 Mon Sep 17 00:00:00 2001 From: Martin Taibr Date: Sun, 29 Sep 2019 11:55:19 +0200 Subject: [PATCH] better explain -O3 in compilation units test --- qcsrc/tools/compilationunits.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qcsrc/tools/compilationunits.sh b/qcsrc/tools/compilationunits.sh index 68f2eb9d5..7a7ff17b6 100755 --- a/qcsrc/tools/compilationunits.sh +++ b/qcsrc/tools/compilationunits.sh @@ -38,7 +38,11 @@ QCCDEFS="${QCCDEFS[@]}" declare -a QCCFLAGS=( -std=gmqcc - -O3 # optimization to accept variable initialization inside `if (1)` blocks and avoid warnings + # Without -O3, GMQCC thinks some variables are used uninitialized if the initialization is done inside an `if (1)` block + # (which is created by e.g. BEGIN_MACRO) which would cause the compilation units test to fail. + # There doesn't appear to be any measurable increase in compile time + # and it allows us to get rid of some explicit initializations which are just useless noise. + -O3 -Wall -Werror -futf8 -freturn-assignments -- 2.39.2