X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=gmqcc.ini.example;h=2b4920c6d19ad55585b67e6911d716c576546eac;hp=f7f391396c9d61dc96f0f4e86a388a4294db9799;hb=f971f89e1e239a74fd34f9f5369993b25d5432ed;hpb=bbeb2517c0bdf7477124f9a3acda0213ebe36529 diff --git a/gmqcc.ini.example b/gmqcc.ini.example index f7f3913..2b4920c 100644 --- a/gmqcc.ini.example +++ b/gmqcc.ini.example @@ -84,6 +84,25 @@ FTEPP_MATHDEFS = false + #Enable indirect macro expansion. This only works in combination + #with '-fftepp' and is currently not included by '-std=fteqcc'. + #Enabling this behavior will allow the preprocessor to operate more + #like the standard C preprocessor in that it will allow arguments + #of macros which are macro-expanded to be substituted into the + #definition of the macro. As an example: + # + # #define STR1(x) #x + # #define STR2(x) STR1(x) + # #define THE_ANSWER 42 + # #define THE_ANSWER_STR STR2(THE_ANSWER) /* "42" */ + # + #With this enabled, an expansion of THE_ANSWER_STR will yield + #the string "42". With this disabled an expansion of THE_ANSWER_STR + #will yield "THE_ANSWER" + + FTEPP_INDIRECT_EXPANSION = false + + #Allow switch cases to use non constant variables. RELAXED_SWITCH = true @@ -310,15 +329,34 @@ SORT_OPERANDS = false + #Emulate OP_STATE operations in code rather than using the instruction. + #The desired fps can be set via -state-fps=NUM, defaults to 10. + + EMULATE_STATE = false + + #Turn on arithmetic exception tests in the compiler. In constant expressions #which trigger exceptions like division by zero, overflow, underflow, etc, #the following flag will produce diagnostics for what triggered that #exception. ARITHMETIC_EXCEPTIONS = false + #Split vector-literals which are only used dirctly as function parameters + #into 3 floats stored separately to reduce the number of globals at the + #expense of additional instructions. + SPLIT_VECTOR_PARAMETERS = false + + #Force all expressions to be "eraseable" which permits the compiler + #to remove unused functions, variables and statements. This is + #equivlant to putting [[eraseable]] on all definitions. This is + #dangerous as it breaks auto cvars, definitions for functions the + #engine may be looking for and translatable strings. Instead, you + #can mark a definition with [[noerase]] to prevent this from happening. + DEFAULT_ERASEABLE = false + [warnings] #Generate a warning about variables which are declared but never - #used. This can be avoided by adding the ‘noref’ keyword in front + #used. This can be avoided by adding the ‘noref’ keyword in front #of the variable declaration. Additionally a complete section of #unreferenced variables can be opened using ‘#pragma noref 1’ and #closed via ‘#pragma noref 0’. @@ -326,6 +364,11 @@ UNUSED_VARIABLE = false + #Generate a warning about vector variables which are declared but + #components of it are never used. + + UNUSED_COMPONENT = false + #Generate a warning if it is possible that a variable can be used #without prior initialization. Note that this warning is not nec‐ #essarily reliable if the initialization happens only under cer‐