1 # This is an example INI file that can be used to set compiler options
2 # without the rquirement for supplying them as arguments on the command
3 # line, this can be coupled with progs.src. To utilize this file there
4 # are two options availble, if it's named "gmqcc.ini" or "gmqcc.cfg" and
5 # the file exists in the directory that GMQCC is invoked from, the compiler
6 # will implicitally find and execute regardless. For more freedom you may
7 # use -config=<file> from the command line to specify a more explicit
8 # directory/name.ext for the configuration file.
11 # These are common compiler flags usually represented via the -f prefix
12 # from the command line.
14 # Enabling this can potentially reduces code size by overlapping
15 # locals where possible.
16 OVERLAP_LOCALS = false
18 # in some older versions of the Darkplaces engine the string table
19 # size is computed wrong causing compiled progs.dat to fail to load
20 # Enabling this works around the bug by writing a few additional
21 # null bytes to the end of the string table to compensate.
22 DARKPLACES_STRING_TABLE_BUG = false
24 # Enabling this corrects the assignment of vector field pointers via
25 # subsituting STORE_FLD with STORE_V.
26 ADJUST_VECTOR_FIELDS = true
28 # Enabling this allows the use of the FTEQ preprocessor, as well as
29 # additional preprocessing directives such as #error and #warning.
32 # Enabling this relaxes switch statement semantics
33 RELAXED_SWITCH = false
35 # Enabling this allows short-circut evaluation and logic, opposed
39 # Enabling this allows perl-like evaluation/logic.
42 # Enabling this allows the use of the "translatable strings" extension
43 # assisted by .po files.
44 TRANSLATABLE_STRINGS = false
46 # Enabling this prevents initializations from becoming constant unless
47 # 'const' is specified as a type qualifier.
48 INITIALIZED_NONCONSTANTS = false
50 # Enabling this allows function types to be assignable even if their
51 # signatures are invariant of each other.
52 ASSIGN_FUNCTION_TYPES = false
54 # Enabling this will allow the generation of .lno files for engine
55 # virtual machine backtraces (this is enabled with -g as well).
58 # Enabling this corrects ternary percedence bugs present in fteqcc.
59 CORRECT_TERNARY = true
61 # These are all the warnings, usually present via the -W prefix from
64 # ?? Used for debugging ??
67 # Enables warnings about unused variables.
68 UNUSED_VARIABLE = true
70 # Enables warnings about uninitialized variables.
71 USED_UNINITIALIZED = true
73 # Enables warnings about the unknown control sequences in the source
75 UNKNOWN_CONTROL_SEQUENCE = true
77 # Enables warnings about the use of (an) extension(s).
80 # Enables warnings about redeclared fields.
81 FIELD_REDECLARED = true
83 # Enables warnings about missing return values.
84 MISSING_RETURN_VALUES = true
86 # Enables warnings about missing parameters for function calls.
87 TOO_FEW_PARAMETERS = true
89 # Enables warnings about locals shadowing parameters or other locals.
92 # Enables warnings about constants specified as locals.
93 LOCAL_CONSTANTS = true
95 # Enables warnings about variables declared as type void.
98 # Enables warnings about implicitally declared function pointers.
99 IMPLICIT_FUNCTION_POINTER = true
101 # Enables warnings for use of varadics for non-builtin functions.
102 VARIADIC_FUNCTION = true
104 # Enables warnings about duplicated frame macros.
107 # Enables warnings about effectivless statements.
108 EFFECTLESS_STATEMENT = true
110 # Enables warnings of "end_sys_fields" beiing declared a field.
111 END_SYS_FIELDS = true
113 # Enables warnings for infompatible function pointer signatures used
115 ASSIGN_FUNCTION_TYPES = true
117 # Enables warnings about redefined macros in the preprocessor
120 # Enables warnings about multi-file if statements
123 # Enables warnings about double declarations
124 DOUBLE_DECLARATION = true
126 # Enables warnings about type qualifiers containing both 'var' and
130 # Enables warnings about the use of multibytes characters / constants
131 MULTIBYTE_CHARACTER = true
133 # Enables warnings about ternary expressions whos precedence may be
134 # not what was initially expected.
135 TERNARY_PRECEDENCE = true
137 # Enables warnings about unknown pragmas.
138 UNKNOWN_PRAGMAS = true
140 # Enables warnings about unreachable code.
141 UNREACHABLE_CODE = true
143 # Enables preprocessor "#warnings"
146 # Finally these are all the optimizations, usually present via the -O
147 # prefix from the command line.
149 # Enables peephole optimizations.
152 # Enables localtemp omission optimizations.
155 # Enables tail recrusion optimizationd.
156 TAIL_RECURSION = true
158 # Enables tail-call optimizations.