Merge branch 'master' of github.com:graphitemaster/gmqcc
[xonotic/gmqcc.git] / opts.def
1 #ifndef GMQCC_DEFINE_FLAG
2 #   error "bad opts.def usage"
3 #endif
4
5 /* codegen flags */
6 #ifdef GMQCC_TYPE_FLAGS
7     GMQCC_DEFINE_FLAG(DARKPLACES_STRING_TABLE_BUG)
8     GMQCC_DEFINE_FLAG(ADJUST_VECTOR_FIELDS)
9     GMQCC_DEFINE_FLAG(FTEPP)
10     GMQCC_DEFINE_FLAG(FTEPP_PREDEFS)
11     GMQCC_DEFINE_FLAG(FTEPP_MATHDEFS)
12     GMQCC_DEFINE_FLAG(FTEPP_INDIRECT_EXPANSION)
13     GMQCC_DEFINE_FLAG(RELAXED_SWITCH)
14     GMQCC_DEFINE_FLAG(SHORT_LOGIC)
15     GMQCC_DEFINE_FLAG(PERL_LOGIC)
16     GMQCC_DEFINE_FLAG(TRANSLATABLE_STRINGS)
17     GMQCC_DEFINE_FLAG(INITIALIZED_NONCONSTANTS)
18     GMQCC_DEFINE_FLAG(ASSIGN_FUNCTION_TYPES)
19     GMQCC_DEFINE_FLAG(LNO)
20     GMQCC_DEFINE_FLAG(CORRECT_TERNARY)
21     GMQCC_DEFINE_FLAG(SINGLE_VECTOR_DEFS)
22     GMQCC_DEFINE_FLAG(CORRECT_LOGIC)
23     GMQCC_DEFINE_FLAG(TRUE_EMPTY_STRINGS)
24     GMQCC_DEFINE_FLAG(FALSE_EMPTY_STRINGS)
25     GMQCC_DEFINE_FLAG(UTF8)
26     GMQCC_DEFINE_FLAG(BAIL_ON_WERROR)
27     GMQCC_DEFINE_FLAG(LOOP_LABELS)
28     GMQCC_DEFINE_FLAG(UNTYPED_NIL)
29     GMQCC_DEFINE_FLAG(PERMISSIVE)
30     GMQCC_DEFINE_FLAG(VARIADIC_ARGS)
31     GMQCC_DEFINE_FLAG(LEGACY_VECTOR_MATHS)
32     GMQCC_DEFINE_FLAG(EXPRESSIONS_FOR_BUILTINS)
33     GMQCC_DEFINE_FLAG(RETURN_ASSIGNMENTS)
34     GMQCC_DEFINE_FLAG(UNSAFE_VARARGS)
35     GMQCC_DEFINE_FLAG(TYPELESS_STORES)
36     GMQCC_DEFINE_FLAG(SORT_OPERANDS)
37     GMQCC_DEFINE_FLAG(EMULATE_STATE)
38     GMQCC_DEFINE_FLAG(ARITHMETIC_EXCEPTIONS)
39     GMQCC_DEFINE_FLAG(SPLIT_VECTOR_PARAMETERS)
40 #endif
41
42 /* warning flags */
43 #ifdef GMQCC_TYPE_WARNS
44     GMQCC_DEFINE_FLAG(UNINITIALIZED_GLOBAL)
45     GMQCC_DEFINE_FLAG(DEBUG)
46     GMQCC_DEFINE_FLAG(UNUSED_VARIABLE)
47     GMQCC_DEFINE_FLAG(UNUSED_COMPONENT)
48     GMQCC_DEFINE_FLAG(USED_UNINITIALIZED)
49     GMQCC_DEFINE_FLAG(UNKNOWN_CONTROL_SEQUENCE)
50     GMQCC_DEFINE_FLAG(EXTENSIONS)
51     GMQCC_DEFINE_FLAG(FIELD_REDECLARED)
52     GMQCC_DEFINE_FLAG(MISSING_RETURN_VALUES)
53     GMQCC_DEFINE_FLAG(INVALID_PARAMETER_COUNT)
54     GMQCC_DEFINE_FLAG(LOCAL_SHADOWS)
55     GMQCC_DEFINE_FLAG(LOCAL_CONSTANTS)
56     GMQCC_DEFINE_FLAG(VOID_VARIABLES)
57     GMQCC_DEFINE_FLAG(IMPLICIT_FUNCTION_POINTER)
58     GMQCC_DEFINE_FLAG(VARIADIC_FUNCTION)
59     GMQCC_DEFINE_FLAG(FRAME_MACROS)
60     GMQCC_DEFINE_FLAG(EFFECTLESS_STATEMENT)
61     GMQCC_DEFINE_FLAG(END_SYS_FIELDS)
62     GMQCC_DEFINE_FLAG(ASSIGN_FUNCTION_TYPES)
63     GMQCC_DEFINE_FLAG(CPP)
64     GMQCC_DEFINE_FLAG(MULTIFILE_IF)
65     GMQCC_DEFINE_FLAG(DOUBLE_DECLARATION)
66     GMQCC_DEFINE_FLAG(CONST_VAR)
67     GMQCC_DEFINE_FLAG(MULTIBYTE_CHARACTER)
68     GMQCC_DEFINE_FLAG(TERNARY_PRECEDENCE)
69     GMQCC_DEFINE_FLAG(UNKNOWN_PRAGMAS)
70     GMQCC_DEFINE_FLAG(UNREACHABLE_CODE)
71     GMQCC_DEFINE_FLAG(UNKNOWN_ATTRIBUTE)
72     GMQCC_DEFINE_FLAG(RESERVED_NAMES)
73     GMQCC_DEFINE_FLAG(UNINITIALIZED_CONSTANT)
74     GMQCC_DEFINE_FLAG(DIFFERENT_QUALIFIERS)
75     GMQCC_DEFINE_FLAG(DIFFERENT_ATTRIBUTES)
76     GMQCC_DEFINE_FLAG(DEPRECATED)
77     GMQCC_DEFINE_FLAG(PARENTHESIS)
78     GMQCC_DEFINE_FLAG(UNSAFE_TYPES)
79     GMQCC_DEFINE_FLAG(BREAKDEF)
80     GMQCC_DEFINE_FLAG(CONST_OVERWRITE)
81     GMQCC_DEFINE_FLAG(DIRECTIVE_INMACRO)
82     GMQCC_DEFINE_FLAG(BUILTINS)
83     GMQCC_DEFINE_FLAG(INEXACT_COMPARES)
84 #endif
85
86 #ifdef GMQCC_TYPE_OPTIMIZATIONS
87     GMQCC_DEFINE_FLAG(PEEPHOLE,             1)
88     GMQCC_DEFINE_FLAG(TAIL_RECURSION,       1)
89     GMQCC_DEFINE_FLAG(OVERLAP_LOCALS,       3)
90     GMQCC_DEFINE_FLAG(LOCAL_TEMPS,          3)
91     GMQCC_DEFINE_FLAG(GLOBAL_TEMPS,         3)
92     GMQCC_DEFINE_FLAG(STRIP_CONSTANT_NAMES, 1)
93     GMQCC_DEFINE_FLAG(OVERLAP_STRINGS,      2)
94     GMQCC_DEFINE_FLAG(CALL_STORES,          3)
95     GMQCC_DEFINE_FLAG(VOID_RETURN,          1)
96     GMQCC_DEFINE_FLAG(VECTOR_COMPONENTS,    1)
97     GMQCC_DEFINE_FLAG(CONST_FOLD_DCE,       2)
98     GMQCC_DEFINE_FLAG(CONST_FOLD,           0) /* cannot be turned off */
99 #endif
100
101 #ifdef GMQCC_TYPE_OPTIONS
102     GMQCC_DEFINE_FLAG(O)
103     GMQCC_DEFINE_FLAG(OUTPUT)
104     GMQCC_DEFINE_FLAG(QUIET)
105     GMQCC_DEFINE_FLAG(G)
106     GMQCC_DEFINE_FLAG(STANDARD)
107     GMQCC_DEFINE_FLAG(DEBUG)
108     GMQCC_DEFINE_FLAG(DUMPFIN)
109     GMQCC_DEFINE_FLAG(DUMP)
110     GMQCC_DEFINE_FLAG(FORCECRC)
111     GMQCC_DEFINE_FLAG(FORCED_CRC)
112     GMQCC_DEFINE_FLAG(PP_ONLY)
113     GMQCC_DEFINE_FLAG(MAX_ARRAY_SIZE)
114     GMQCC_DEFINE_FLAG(ADD_INFO)
115     GMQCC_DEFINE_FLAG(PROGSRC)
116     GMQCC_DEFINE_FLAG(COVERAGE)
117     GMQCC_DEFINE_FLAG(STATE_FPS)
118 #endif
119
120 /* some cleanup so we don't have to */
121 #undef GMQCC_TYPE_FLAGS
122 #undef GMQCC_TYPE_WARNS
123 #undef GMQCC_TYPE_OPTIONS
124 #undef GMQCC_TYPE_OPTIMIZATIONS
125 #undef GMQCC_DEFINE_FLAG