2012-12-21 04:01:47 +00:00
|
|
|
# This is an example INI file that can be used to set compiler options
|
|
|
|
# without the rquirement for supplying them as arguments on the command
|
|
|
|
# line, this can be coupled with progs.src. To utilize this file there
|
|
|
|
# are two options availble, if it's named "gmqcc.ini" or "gmqcc.cfg" and
|
|
|
|
# the file exists in the directory that GMQCC is invoked from, the compiler
|
|
|
|
# will implicitally find and execute regardless. For more freedom you may
|
|
|
|
# use -config=<file> from the command line to specify a more explicit
|
|
|
|
# directory/name.ext for the configuration file.
|
2012-12-18 05:12:57 +00:00
|
|
|
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# These are common compiler flags usually represented via the -f prefix
|
|
|
|
# from the command line.
|
2012-12-18 05:12:57 +00:00
|
|
|
[flags]
|
2012-12-21 04:01:47 +00:00
|
|
|
# Enabling this can potentially reduces code size by overlapping
|
|
|
|
# locals where possible.
|
|
|
|
OVERLAP_LOCALS = false
|
|
|
|
|
|
|
|
# in some older versions of the Darkplaces engine the string table
|
|
|
|
# size is computed wrong causing compiled progs.dat to fail to load
|
|
|
|
# Enabling this works around the bug by writing a few additional
|
|
|
|
# null bytes to the end of the string table to compensate.
|
|
|
|
DARKPLACES_STRING_TABLE_BUG = false
|
|
|
|
|
|
|
|
# Enabling this corrects the assignment of vector field pointers via
|
|
|
|
# subsituting STORE_FLD with STORE_V.
|
2012-12-18 05:12:57 +00:00
|
|
|
ADJUST_VECTOR_FIELDS = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enabling this allows the use of the FTEQ preprocessor, as well as
|
|
|
|
# additional preprocessing directives such as #error and #warning.
|
2012-12-18 05:12:57 +00:00
|
|
|
FTEPP = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enabling this relaxes switch statement semantics
|
2012-12-18 05:12:57 +00:00
|
|
|
RELAXED_SWITCH = false
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enabling this allows short-circut evaluation and logic, opposed
|
|
|
|
# to full evaluation.
|
2012-12-18 05:12:57 +00:00
|
|
|
SHORT_LOGIC = false
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enabling this allows perl-like evaluation/logic.
|
2012-12-18 05:12:57 +00:00
|
|
|
PERL_LOGIC = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enabling this allows the use of the "translatable strings" extension
|
|
|
|
# assisted by .po files.
|
2012-12-18 05:12:57 +00:00
|
|
|
TRANSLATABLE_STRINGS = false
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enabling this prevents initializations from becoming constant unless
|
|
|
|
# 'const' is specified as a type qualifier.
|
2012-12-18 05:12:57 +00:00
|
|
|
INITIALIZED_NONCONSTANTS = false
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enabling this allows function types to be assignable even if their
|
|
|
|
# signatures are invariant of each other.
|
2012-12-18 05:12:57 +00:00
|
|
|
ASSIGN_FUNCTION_TYPES = false
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enabling this will allow the generation of .lno files for engine
|
|
|
|
# virtual machine backtraces (this is enabled with -g as well).
|
2012-12-18 05:12:57 +00:00
|
|
|
LNO = false
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enabling this corrects ternary percedence bugs present in fteqcc.
|
2012-12-18 05:12:57 +00:00
|
|
|
CORRECT_TERNARY = true
|
|
|
|
|
2012-12-28 20:04:14 +00:00
|
|
|
# Prevent the creation of _x, _y and _z progdefs for vectors
|
|
|
|
SINGLE_VECTOR_DEFS = false
|
|
|
|
|
2012-12-28 20:05:04 +00:00
|
|
|
# Cast vectors to real booleans when used in logic expressions.
|
2012-12-28 20:04:14 +00:00
|
|
|
# This is achieved by using NOT_V.
|
|
|
|
CORRECT_LOGIC = false
|
|
|
|
|
|
|
|
# Always treat empty strings as true. Usuall !"" yields true, because
|
|
|
|
# the string-NOT instruction considers empty strings to be false, while
|
|
|
|
# an empty string as condition for 'if' will be considered true, since
|
|
|
|
# only the numerical value of the global is looked at.
|
|
|
|
TRUE_EMPTY_STRINGS = false
|
|
|
|
|
|
|
|
# Opposite of the above, empty strings are always false. Similar to
|
|
|
|
# CORRECT_LOGIC this will always use NOT_S to cast a string to a real
|
|
|
|
# boolean value.
|
|
|
|
FALSE_EMPTY_STRINGS = false
|
|
|
|
|
|
|
|
# Recognize utf-8 characters in character constants, and encode
|
|
|
|
# codepoint escape sequences in strings as utf-8. This essentially allows
|
|
|
|
# \{1234} escape sequences to be higher than 255.
|
|
|
|
UTF8
|
|
|
|
|
|
|
|
# When a warning is printed and it is set to be treated as error via
|
|
|
|
# a -Werror switch, compilation will be stopped, unless this is false.
|
|
|
|
# When this is false, the rest of the code will be compiled, and at the end
|
|
|
|
# the file and line of the first warning will be shown.
|
|
|
|
BAIL_ON_WERROR = true
|
|
|
|
|
|
|
|
# Allow loops and switches to be labeled and break and continue to take an
|
|
|
|
# optional label to target a specific loop/switch.
|
|
|
|
LOOP_LABELS = false
|
|
|
|
|
|
|
|
# Enable the 'nil' null constant, which has no type. It can be used as the
|
|
|
|
# right hand of any assignment regardless of the required type.
|
|
|
|
UNTYPED_NIL = false
|
|
|
|
|
|
|
|
# Be "permissive". For instance, when -funtyped-nil is used, this allows local
|
|
|
|
# variables with the name 'nil' to be declared.
|
|
|
|
PREMISSIVE = false
|
|
|
|
|
2012-12-21 04:01:47 +00:00
|
|
|
# These are all the warnings, usually present via the -W prefix from
|
|
|
|
# the command line.
|
2012-12-18 05:12:57 +00:00
|
|
|
[warnings]
|
2012-12-21 04:01:47 +00:00
|
|
|
# ?? Used for debugging ??
|
2012-12-18 05:12:57 +00:00
|
|
|
DEBUG = false
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about unused variables.
|
2012-12-18 05:12:57 +00:00
|
|
|
UNUSED_VARIABLE = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about uninitialized variables.
|
2012-12-18 05:12:57 +00:00
|
|
|
USED_UNINITIALIZED = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about the unknown control sequences in the source
|
|
|
|
# stream.
|
2012-12-18 05:12:57 +00:00
|
|
|
UNKNOWN_CONTROL_SEQUENCE = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about the use of (an) extension(s).
|
2012-12-18 05:12:57 +00:00
|
|
|
EXTENSIONS = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about redeclared fields.
|
2012-12-18 05:12:57 +00:00
|
|
|
FIELD_REDECLARED = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about missing return values.
|
2012-12-18 05:12:57 +00:00
|
|
|
MISSING_RETURN_VALUES = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about missing parameters for function calls.
|
2012-12-18 05:12:57 +00:00
|
|
|
TOO_FEW_PARAMETERS = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about locals shadowing parameters or other locals.
|
2012-12-18 05:12:57 +00:00
|
|
|
LOCAL_SHADOWS = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about constants specified as locals.
|
2012-12-18 05:12:57 +00:00
|
|
|
LOCAL_CONSTANTS = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about variables declared as type void.
|
2012-12-18 05:12:57 +00:00
|
|
|
VOID_VARIABLES = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about implicitally declared function pointers.
|
2012-12-18 05:12:57 +00:00
|
|
|
IMPLICIT_FUNCTION_POINTER = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings for use of varadics for non-builtin functions.
|
2012-12-18 05:12:57 +00:00
|
|
|
VARIADIC_FUNCTION = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about duplicated frame macros.
|
2012-12-18 05:12:57 +00:00
|
|
|
FRAME_MACROS = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about effectivless statements.
|
2012-12-18 05:12:57 +00:00
|
|
|
EFFECTLESS_STATEMENT = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings of "end_sys_fields" beiing declared a field.
|
2012-12-18 05:12:57 +00:00
|
|
|
END_SYS_FIELDS = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings for infompatible function pointer signatures used
|
|
|
|
# in assignment.
|
2012-12-18 05:12:57 +00:00
|
|
|
ASSIGN_FUNCTION_TYPES = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about redefined macros in the preprocessor
|
2012-12-18 05:12:57 +00:00
|
|
|
PREPROCESSOR = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about multi-file if statements
|
2012-12-18 05:12:57 +00:00
|
|
|
MULTIFILE_IF = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about double declarations
|
2012-12-18 05:12:57 +00:00
|
|
|
DOUBLE_DECLARATION = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about type qualifiers containing both 'var' and
|
|
|
|
# 'const'
|
2012-12-18 05:12:57 +00:00
|
|
|
CONST_VAR = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about the use of multibytes characters / constants
|
2012-12-18 05:12:57 +00:00
|
|
|
MULTIBYTE_CHARACTER = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about ternary expressions whos precedence may be
|
|
|
|
# not what was initially expected.
|
2012-12-18 05:12:57 +00:00
|
|
|
TERNARY_PRECEDENCE = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about unknown pragmas.
|
2012-12-18 05:12:57 +00:00
|
|
|
UNKNOWN_PRAGMAS = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables warnings about unreachable code.
|
2012-12-21 03:14:31 +00:00
|
|
|
UNREACHABLE_CODE = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables preprocessor "#warnings"
|
2012-12-21 03:14:31 +00:00
|
|
|
CPP = true
|
2012-12-18 05:12:57 +00:00
|
|
|
|
2012-12-28 20:04:14 +00:00
|
|
|
# With the [[attribute]] syntax enabled, warn when an unknown
|
|
|
|
# attribute is encountered. Its first token will be included in the
|
|
|
|
# message.
|
|
|
|
UNKNOWN_ATTRIBUTE = true
|
|
|
|
|
|
|
|
# Warn when declaring variables or fields with a reserved name like 'nil'
|
|
|
|
RESERVED_NAMES = true
|
|
|
|
|
|
|
|
# Warn about 'const'-qualified global variables with no initializing value.
|
|
|
|
UNINITIALIZED_CONSTANT = true
|
|
|
|
|
|
|
|
# Warn about non-constant global variables with no initializing value.
|
|
|
|
UNINITIALIZED_GLOBAL = true
|
|
|
|
|
2012-12-21 04:01:47 +00:00
|
|
|
# Finally these are all the optimizations, usually present via the -O
|
|
|
|
# prefix from the command line.
|
2012-12-18 05:12:57 +00:00
|
|
|
[optimizations]
|
2012-12-21 04:01:47 +00:00
|
|
|
# Enables peephole optimizations.
|
2012-12-18 05:12:57 +00:00
|
|
|
PEEPHOLE = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables localtemp omission optimizations.
|
2012-12-18 05:12:57 +00:00
|
|
|
LOCALTEMPS = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
|
|
|
# Enables tail recrusion optimizationd.
|
2012-12-18 05:12:57 +00:00
|
|
|
TAIL_RECURSION = true
|
2012-12-21 04:01:47 +00:00
|
|
|
|
2012-12-28 20:04:14 +00:00
|
|
|
# Enables tail-call optimizations. (Not implemented)
|
2012-12-18 05:12:57 +00:00
|
|
|
TAIL_CALLS = true
|
2012-12-28 20:04:14 +00:00
|
|
|
|
|
|
|
# Every function where it is safe to do so will share its local data section
|
|
|
|
# with the others. The criteria are currently that the function must not have
|
|
|
|
# any possibly uninitialized locals, or local arrays regardless of how they
|
|
|
|
# are initialized.
|
|
|
|
OVERLAP_LOCALS = false
|
|
|
|
|
|
|
|
# Strip out the names of constants to save some space in the progs.dat
|
|
|
|
STRIP_CONSTANT_NAMES = true
|
|
|
|
|
|
|
|
# Aggressivly reuse strings in the string-section
|
|
|
|
OVERLAP_STRINGS = true
|
|
|
|
|
|
|
|
# Have expressions which are used as function parameters evaluate directly
|
|
|
|
# into the parameter-globals if possible.
|
|
|
|
# This avoids a whole lot of copying.
|
|
|
|
CALL_STORES = true
|
|
|
|
|
|
|
|
# Do not create a RETURN instruction at the end functions of return-type void.
|
|
|
|
VOID_RETURN = true
|