+ #Add some additional characters to the string table in order to
+ #compensate for a wrong boundcheck in some specific version of the
+ #darkplaces engine.
+
+ DARKPLACES_STRING_TABLE_BUG = true
+
+
+ #When assigning to field pointers of type .vector the common be‐
+ #haviour in compilers like fteqcc is to only assign the x-compo‐
+ #nent of the pointer. This means that you can use the vector as
+ #such, but you cannot use its y and z components directly. This
+ #flag fixes this behaviour. Before using it make sure your code
+ #does not depend on the buggy behaviour.
+
+ ADJUST_VECTOR_FIELDS = true
+
+
+ #Enable a partially fteqcc-compatible preprocessor. It supports
+ #all the features used in the Xonotic codebase. If you need more,
+ #write a ticket.
+
+ FTEPP = true
+
+
+ #Enable some predefined macros. This only works in combination
+ #with '-fftepp' and is currently not included by '-std=fteqcc'.
+ #The following macros will be added:
+ #
+ # __LINE__
+ # __FILE__
+ # __COUNTER__
+ # __COUNTER_LAST__
+ # __RANDOM__
+ # __RANDOM_LAST__
+ # __DATE__
+ # __TIME__
+ # __FUNC__
+ #
+ #Note that __FUNC__ is not actually a preprocessor macro, but is
+ #recognized by the parser even with the preprocessor disabled.
+ #
+ #Note that fteqcc also defines __NULL__ which becomes the first
+ #global. Assigning it to a vector does not yield the same result
+ #as in gmqcc where __NULL__ is defined to nil (See -funtyped-nil
+ #), which will cause the vector to be zero in all components. With
+ #fteqcc only the first component will be 0, while the other two
+ #will become the first to of the global return value. This behav‐
+ #ior is odd and relying on it should be discouraged, and thus is
+ #not supported by gmqcc.
+
+ FTEPP_PREDEFS = false
+
+
+ #Allow switch cases to use non constant variables.
+
+ RELAXED_SWITCH = true
+
+
+ #Perform early out in logical AND and OR expressions. The final
+ #result will be either a 0 or a 1, see the next flag for more pos‐
+ #sibilities.
+
+ SHORT_LOGIC = true
+
+
+ #In many languages, logical expressions perform early out in a
+ #special way: If the left operand of an AND yeilds true, or the
+ #one of an OR yields false, the complete expression evaluates to
+ #the right side. Thus ‘true && 5’ evaluates to 5 rather than 1.
+
+ PERL_LOGIC = false
+
+
+ #Enable the underscore intrinsic: Using ‘_("A string constant")’
+ #will cause the string immediate to get a name with a "dotrans‐
+ #late_" prefix. The darkplaces engine recognizes these and trans‐
+ #lates them in a way similar to how gettext works.
+
+ TRANSLATABLE_STRINGS = true
+
+
+ #Don't implicitly convert initialized variables to constants. With
+ #this flag, the const keyword is required to make a constant.
+
+ INITIALIZED_NONCONSTANTS = false
+
+
+ #If this flag is not set, (and it is set by default in the qcc and
+ #fteqcc standards), assigning function pointers of mismatching
+ #signatures will result in an error rather than a warning.
+
+ ASSIGN_FUNCTION_TYPES = true
+
+
+ #Produce a linenumber file along with the output .dat file.
+
+ LNO = false
+
+
+ #Use C's operator precedence for ternary expressions. Unless your
+ #code depends on fteqcc-compatible behaviour, you'll want to use
+ #this option.
+
+ CORRECT_TERNARY = true
+
+
+ #Normally vectors generate 4 defs, once for the vector, and once
+ #for its components with _x, _y, _z suffixes. This option prevents
+ #components from being listed.
+
+
+ SINGLE_VECTOR_DEFS = true
+
+
+ #Most QC compilers translate ‘if(a_vector)’ directly as an IF on
+ #the vector, which means only the x-component is checked. This
+ #option causes vectors to be cast to actual booleans via a NOT_V
+ #and, if necessary, a NOT_F chained to it.
+ #
+ # if (a_vector) // becomes
+ # if not(!a_vector)
+ # // likewise
+ # a = a_vector && a_float // becomes
+ # a = !!a_vector && a_float
+
+ CORRECT_LOGIC = true
+
+
+ #An empty string is considered to be true everywhere. The NOT_S
+ #instruction usually considers an empty string to be false, this
+ #option effectively causes the unary not in strings to use NOT_F
+ #instead.
+
+ TRUE_EMPTY_STRINGS = false
+
+
+ #An empty string is considered to be false everywhere. This means
+ #loops and if statements which depend on a string will perform a
+ #NOT_S instruction on the string before using it.
+
+ FALSE_EMPTY_STRINGS = true
+
+
+ #Enable utf8 characters. This allows utf-8 encoded character con‐
+ #stants, and escape sequence codepoints in the valid utf-8 range.
+ #Effectively enabling escape sequences like '\{x2211}'.
+
+ UTF8 = true
+
+
+ #When a warning is treated as an error, and this option is set
+ #(which it is by default), it is like any other error and will
+ #cause compilation to stop. When disabling this flag by using
+ #-fno-bail-on-werror, compilation will continue until the end, but
+ #no output is generated. Instead the first such error message's
+ #context is shown.
+
+ BAIL_ON_WERROR = false
+
+
+ #Allow loops to be labeled, and allow 'break' and 'continue' to
+ #take an optional label to decide which loop to actually jump out
+ #of or continue.
+ #
+ # for :outer (i = 0; i < n; ++i) {
+ # while (inner) {
+ # ...;
+ # if (something)
+ # continue outer;
+ # }
+ # }
+
+ LOOP_LABELS = true
+
+
+ #Adds a global named 'nil' which is of no type and can be assigned
+ #to anything. No typechecking will be performed on assignments.
+ #Assigning to it is forbidden, using it in any other kind of
+ #expression is also not allowed.
+ #
+ #Note that this is different from fteqcc's __NULL__: In fteqcc,
+ #__NULL__ maps to the integer written as '0i'. It's can be
+ #assigned to function pointers and integers, but it'll error about
+ #invalid instructions when assigning it to floats without enabling
+ #the FTE instruction set. There's also a bug which allows it to be
+ #assigned to vectors, for which the source will be the global at
+ #offset 0, meaning the vector's y and z components will contain
+ #the OFS_RETURN x and y components.#
+ #
+ #In that gmqcc the nil global is an actual global filled with
+ #zeroes, and can be assigned to anything including fields, vectors
+ #or function pointers, and they end up becoming zeroed.
+
+
+ UNTYPED_NIL = true
+
+
+ #Various effects, usually to weaken some conditions.
+ # with -funtyped-nil
+ # Allow local variables named ‘nil’. (This will not
+ # allow declaring a global of that name.)
+
+ PERMISSIVE = false
+
+
+ #Allow variadic parameters to be accessed by QC code. This can be
+ #achieved via the '...' function, which takes a parameter index
+ #and a typename.
+ #
+ #Example:
+ #
+ # void vafunc(string...count) {
+ # float i;
+ # for (i = 0; i < count; ++i)
+ # print(...(i, string), "\n");
+ # }
+
+ VARIADIC_ARGS = true
+
+
+ #Most Quake VMs, including the one from FTEQW or up till recently
+ #Darkplaces, do not cope well with vector instructions with over‐
+ #lapping input and output. This option will avoid producing such
+ #code.
+
+ LEGACY_VECTOR_MATHS = false
+
+
+ #Usually builtin-numbers are just immediate constants. With this
+ #flag expressions can be used, as long as they are compile-time
+ #constant.
+ #
+ #Example:
+ #
+ # void printA() = #1; // the usual way
+ # void printB() = #2-1; // with a constant expression
+
+ EXPRESSIONS_FOR_BUILTINS = true
+
+
+ #Enabiling this option will allow assigning values or expressions
+ #to the return keyword as if it were a local variable of the same
+ #type as the function's signature's return type.
+ #
+ #Example:
+ #
+ # float bar() { return 1024; }
+ # float fun() {
+ # return = bar();
+ # return; // returns value of bar (this can be omitted)
+ # }
+
+ RETURN_ASSIGNMENTS = true
+
+
+ #When passing on varargs to a different functions, this turns some
+ #static error cases into warnings. Like when the caller's varargs
+ #are restricted to a different type than the callee's parameter.
+ #Or a list of unrestricted varargs is passed into restricted
+ #varargs.
+
+ UNSAFE_VARARGS = false
+
+
+ #Always use STORE_F, LOAD_F, STOREP_F when accessing scalar variables.
+ #This is somewhat incorrect assembly instruction use, but in all engines
+ #they do exactly the same. This makes disassembly output harder to read,
+ #breaks decompilers, but causes the output file to be better compressible.
+
+ TYPELESS_STORES = false
+
+
+ #In commutative instructions, always put the lower-numbered operand first.
+ #This shaves off 1 byte of entropy from all these instructions, reducing
+ #compressed size of the output file.
+
+ SORT_OPERANDS = false
+
+
+