2 * Copyright (C) 2012, 2013, 2014
6 * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 * this software and associated documentation files (the "Software"), to deal in
8 * the Software without restriction, including without limitation the rights to
9 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 * of the Software, and to permit persons to whom the Software is furnished to do
11 * so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 #ifndef GMQCC_DEFINE_FLAG
25 # error "bad opts.def usage"
29 #ifdef GMQCC_TYPE_FLAGS
30 GMQCC_DEFINE_FLAG(DARKPLACES_STRING_TABLE_BUG)
31 GMQCC_DEFINE_FLAG(ADJUST_VECTOR_FIELDS)
32 GMQCC_DEFINE_FLAG(FTEPP)
33 GMQCC_DEFINE_FLAG(FTEPP_PREDEFS)
34 GMQCC_DEFINE_FLAG(FTEPP_MATHDEFS)
35 GMQCC_DEFINE_FLAG(FTEPP_INDIRECT_EXPANSION)
36 GMQCC_DEFINE_FLAG(RELAXED_SWITCH)
37 GMQCC_DEFINE_FLAG(SHORT_LOGIC)
38 GMQCC_DEFINE_FLAG(PERL_LOGIC)
39 GMQCC_DEFINE_FLAG(TRANSLATABLE_STRINGS)
40 GMQCC_DEFINE_FLAG(INITIALIZED_NONCONSTANTS)
41 GMQCC_DEFINE_FLAG(ASSIGN_FUNCTION_TYPES)
42 GMQCC_DEFINE_FLAG(LNO)
43 GMQCC_DEFINE_FLAG(CORRECT_TERNARY)
44 GMQCC_DEFINE_FLAG(SINGLE_VECTOR_DEFS)
45 GMQCC_DEFINE_FLAG(CORRECT_LOGIC)
46 GMQCC_DEFINE_FLAG(TRUE_EMPTY_STRINGS)
47 GMQCC_DEFINE_FLAG(FALSE_EMPTY_STRINGS)
48 GMQCC_DEFINE_FLAG(UTF8)
49 GMQCC_DEFINE_FLAG(BAIL_ON_WERROR)
50 GMQCC_DEFINE_FLAG(LOOP_LABELS)
51 GMQCC_DEFINE_FLAG(UNTYPED_NIL)
52 GMQCC_DEFINE_FLAG(PERMISSIVE)
53 GMQCC_DEFINE_FLAG(VARIADIC_ARGS)
54 GMQCC_DEFINE_FLAG(LEGACY_VECTOR_MATHS)
55 GMQCC_DEFINE_FLAG(EXPRESSIONS_FOR_BUILTINS)
56 GMQCC_DEFINE_FLAG(RETURN_ASSIGNMENTS)
57 GMQCC_DEFINE_FLAG(UNSAFE_VARARGS)
58 GMQCC_DEFINE_FLAG(TYPELESS_STORES)
59 GMQCC_DEFINE_FLAG(SORT_OPERANDS)
60 GMQCC_DEFINE_FLAG(EMULATE_STATE)
61 GMQCC_DEFINE_FLAG(ARITHMETIC_EXCEPTIONS)
62 GMQCC_DEFINE_FLAG(SPLIT_VECTOR_PARAMETERS)
66 #ifdef GMQCC_TYPE_WARNS
67 GMQCC_DEFINE_FLAG(UNINITIALIZED_GLOBAL)
68 GMQCC_DEFINE_FLAG(DEBUG)
69 GMQCC_DEFINE_FLAG(UNUSED_VARIABLE)
70 GMQCC_DEFINE_FLAG(USED_UNINITIALIZED)
71 GMQCC_DEFINE_FLAG(UNKNOWN_CONTROL_SEQUENCE)
72 GMQCC_DEFINE_FLAG(EXTENSIONS)
73 GMQCC_DEFINE_FLAG(FIELD_REDECLARED)
74 GMQCC_DEFINE_FLAG(MISSING_RETURN_VALUES)
75 GMQCC_DEFINE_FLAG(INVALID_PARAMETER_COUNT)
76 GMQCC_DEFINE_FLAG(LOCAL_SHADOWS)
77 GMQCC_DEFINE_FLAG(LOCAL_CONSTANTS)
78 GMQCC_DEFINE_FLAG(VOID_VARIABLES)
79 GMQCC_DEFINE_FLAG(IMPLICIT_FUNCTION_POINTER)
80 GMQCC_DEFINE_FLAG(VARIADIC_FUNCTION)
81 GMQCC_DEFINE_FLAG(FRAME_MACROS)
82 GMQCC_DEFINE_FLAG(EFFECTLESS_STATEMENT)
83 GMQCC_DEFINE_FLAG(END_SYS_FIELDS)
84 GMQCC_DEFINE_FLAG(ASSIGN_FUNCTION_TYPES)
85 GMQCC_DEFINE_FLAG(CPP)
86 GMQCC_DEFINE_FLAG(MULTIFILE_IF)
87 GMQCC_DEFINE_FLAG(DOUBLE_DECLARATION)
88 GMQCC_DEFINE_FLAG(CONST_VAR)
89 GMQCC_DEFINE_FLAG(MULTIBYTE_CHARACTER)
90 GMQCC_DEFINE_FLAG(TERNARY_PRECEDENCE)
91 GMQCC_DEFINE_FLAG(UNKNOWN_PRAGMAS)
92 GMQCC_DEFINE_FLAG(UNREACHABLE_CODE)
93 GMQCC_DEFINE_FLAG(UNKNOWN_ATTRIBUTE)
94 GMQCC_DEFINE_FLAG(RESERVED_NAMES)
95 GMQCC_DEFINE_FLAG(UNINITIALIZED_CONSTANT)
96 GMQCC_DEFINE_FLAG(DIFFERENT_QUALIFIERS)
97 GMQCC_DEFINE_FLAG(DIFFERENT_ATTRIBUTES)
98 GMQCC_DEFINE_FLAG(DEPRECATED)
99 GMQCC_DEFINE_FLAG(PARENTHESIS)
100 GMQCC_DEFINE_FLAG(UNSAFE_TYPES)
101 GMQCC_DEFINE_FLAG(BREAKDEF)
102 GMQCC_DEFINE_FLAG(CONST_OVERWRITE)
103 GMQCC_DEFINE_FLAG(DIRECTIVE_INMACRO)
104 GMQCC_DEFINE_FLAG(BUILTINS)
105 GMQCC_DEFINE_FLAG(INEXACT_COMPARES)
108 #ifdef GMQCC_TYPE_OPTIMIZATIONS
109 GMQCC_DEFINE_FLAG(PEEPHOLE, 1)
110 GMQCC_DEFINE_FLAG(TAIL_RECURSION, 1)
111 GMQCC_DEFINE_FLAG(OVERLAP_LOCALS, 3)
112 GMQCC_DEFINE_FLAG(LOCAL_TEMPS, 3)
113 GMQCC_DEFINE_FLAG(GLOBAL_TEMPS, 3)
114 GMQCC_DEFINE_FLAG(STRIP_CONSTANT_NAMES, 1)
115 GMQCC_DEFINE_FLAG(OVERLAP_STRINGS, 2)
116 GMQCC_DEFINE_FLAG(CALL_STORES, 3)
117 GMQCC_DEFINE_FLAG(VOID_RETURN, 1)
118 GMQCC_DEFINE_FLAG(VECTOR_COMPONENTS, 1)
119 GMQCC_DEFINE_FLAG(CONST_FOLD_DCE, 2)
120 GMQCC_DEFINE_FLAG(CONST_FOLD, 0) /* cannot be turned off */
123 #ifdef GMQCC_TYPE_OPTIONS
125 GMQCC_DEFINE_FLAG(OUTPUT)
126 GMQCC_DEFINE_FLAG(QUIET)
128 GMQCC_DEFINE_FLAG(STANDARD)
129 GMQCC_DEFINE_FLAG(DEBUG)
130 GMQCC_DEFINE_FLAG(MEMDUMPCOLS)
131 GMQCC_DEFINE_FLAG(MEMCHK)
132 GMQCC_DEFINE_FLAG(DUMPFIN)
133 GMQCC_DEFINE_FLAG(DUMP)
134 GMQCC_DEFINE_FLAG(FORCECRC)
135 GMQCC_DEFINE_FLAG(FORCED_CRC)
136 GMQCC_DEFINE_FLAG(PP_ONLY)
137 GMQCC_DEFINE_FLAG(MAX_ARRAY_SIZE)
138 GMQCC_DEFINE_FLAG(ADD_INFO)
139 GMQCC_DEFINE_FLAG(STATISTICS)
140 GMQCC_DEFINE_FLAG(PROGSRC)
141 GMQCC_DEFINE_FLAG(COVERAGE)
142 GMQCC_DEFINE_FLAG(STATE_FPS)
145 /* some cleanup so we don't have to */
146 #undef GMQCC_TYPE_FLAGS
147 #undef GMQCC_TYPE_WARNS
148 #undef GMQCC_TYPE_OPTIONS
149 #undef GMQCC_TYPE_OPTIMIZATIONS
150 #undef GMQCC_DEFINE_FLAG