gmqcc/gmqcc.ini.example

235 lines
8.9 KiB
Text
Raw Normal View History

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-21 04:01:47 +00:00
# These are common compiler flags usually represented via the -f prefix
# from the command line.
[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.
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.
FTEPP = true
2012-12-21 04:01:47 +00:00
# Enabling this relaxes switch statement semantics
RELAXED_SWITCH = false
2012-12-21 04:01:47 +00:00
# Enabling this allows short-circut evaluation and logic, opposed
# to full evaluation.
SHORT_LOGIC = false
2012-12-21 04:01:47 +00:00
# Enabling this allows perl-like evaluation/logic.
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.
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.
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.
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).
LNO = false
2012-12-21 04:01:47 +00:00
# Enabling this corrects ternary percedence bugs present in fteqcc.
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.
[warnings]
2012-12-21 04:01:47 +00:00
# ?? Used for debugging ??
DEBUG = false
2012-12-21 04:01:47 +00:00
# Enables warnings about unused variables.
UNUSED_VARIABLE = true
2012-12-21 04:01:47 +00:00
# Enables warnings about uninitialized variables.
USED_UNINITIALIZED = true
2012-12-21 04:01:47 +00:00
# Enables warnings about the unknown control sequences in the source
# stream.
UNKNOWN_CONTROL_SEQUENCE = true
2012-12-21 04:01:47 +00:00
# Enables warnings about the use of (an) extension(s).
EXTENSIONS = true
2012-12-21 04:01:47 +00:00
# Enables warnings about redeclared fields.
FIELD_REDECLARED = true
2012-12-21 04:01:47 +00:00
# Enables warnings about missing return values.
MISSING_RETURN_VALUES = true
2012-12-21 04:01:47 +00:00
# Enables warnings about missing parameters for function calls.
TOO_FEW_PARAMETERS = true
2012-12-21 04:01:47 +00:00
# Enables warnings about locals shadowing parameters or other locals.
LOCAL_SHADOWS = true
2012-12-21 04:01:47 +00:00
# Enables warnings about constants specified as locals.
LOCAL_CONSTANTS = true
2012-12-21 04:01:47 +00:00
# Enables warnings about variables declared as type void.
VOID_VARIABLES = true
2012-12-21 04:01:47 +00:00
# Enables warnings about implicitally declared function pointers.
IMPLICIT_FUNCTION_POINTER = true
2012-12-21 04:01:47 +00:00
# Enables warnings for use of varadics for non-builtin functions.
VARIADIC_FUNCTION = true
2012-12-21 04:01:47 +00:00
# Enables warnings about duplicated frame macros.
FRAME_MACROS = true
2012-12-21 04:01:47 +00:00
# Enables warnings about effectivless statements.
EFFECTLESS_STATEMENT = true
2012-12-21 04:01:47 +00:00
# Enables warnings of "end_sys_fields" beiing declared a field.
END_SYS_FIELDS = true
2012-12-21 04:01:47 +00:00
# Enables warnings for infompatible function pointer signatures used
# in assignment.
ASSIGN_FUNCTION_TYPES = true
2012-12-21 04:01:47 +00:00
# Enables warnings about redefined macros in the preprocessor
PREPROCESSOR = true
2012-12-21 04:01:47 +00:00
# Enables warnings about multi-file if statements
MULTIFILE_IF = true
2012-12-21 04:01:47 +00:00
# Enables warnings about double declarations
DOUBLE_DECLARATION = true
2012-12-21 04:01:47 +00:00
# Enables warnings about type qualifiers containing both 'var' and
# 'const'
CONST_VAR = true
2012-12-21 04:01:47 +00:00
# Enables warnings about the use of multibytes characters / constants
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.
TERNARY_PRECEDENCE = true
2012-12-21 04:01:47 +00:00
# Enables warnings about unknown pragmas.
UNKNOWN_PRAGMAS = true
2012-12-21 04:01:47 +00:00
# Enables warnings about unreachable code.
UNREACHABLE_CODE = true
2012-12-21 04:01:47 +00:00
# Enables preprocessor "#warnings"
CPP = true
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.
[optimizations]
2012-12-21 04:01:47 +00:00
# Enables peephole optimizations.
PEEPHOLE = true
2012-12-21 04:01:47 +00:00
# Enables localtemp omission optimizations.
LOCALTEMPS = true
2012-12-21 04:01:47 +00:00
# Enables tail recrusion optimizationd.
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)
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