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