2012-11-10 21:13:09 +00:00
|
|
|
#ifndef GMQCC_DEFINE_FLAG
|
2013-02-03 23:20:41 +00:00
|
|
|
# error "bad opts.def usage"
|
2012-11-10 21:13:09 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* codegen flags */
|
|
|
|
#ifdef GMQCC_TYPE_FLAGS
|
2013-02-03 23:19:56 +00:00
|
|
|
GMQCC_DEFINE_FLAG(DARKPLACES_STRING_TABLE_BUG)
|
|
|
|
GMQCC_DEFINE_FLAG(ADJUST_VECTOR_FIELDS)
|
|
|
|
GMQCC_DEFINE_FLAG(FTEPP)
|
|
|
|
GMQCC_DEFINE_FLAG(FTEPP_PREDEFS)
|
2013-12-01 15:45:43 +00:00
|
|
|
GMQCC_DEFINE_FLAG(FTEPP_MATHDEFS)
|
2014-09-27 05:48:03 +00:00
|
|
|
GMQCC_DEFINE_FLAG(FTEPP_INDIRECT_EXPANSION)
|
2013-02-03 23:19:56 +00:00
|
|
|
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)
|
2013-04-25 17:08:02 +00:00
|
|
|
GMQCC_DEFINE_FLAG(EXPRESSIONS_FOR_BUILTINS)
|
2013-05-29 11:13:42 +00:00
|
|
|
GMQCC_DEFINE_FLAG(RETURN_ASSIGNMENTS)
|
2013-06-12 15:23:39 +00:00
|
|
|
GMQCC_DEFINE_FLAG(UNSAFE_VARARGS)
|
2013-08-27 07:46:58 +00:00
|
|
|
GMQCC_DEFINE_FLAG(TYPELESS_STORES)
|
|
|
|
GMQCC_DEFINE_FLAG(SORT_OPERANDS)
|
2014-04-08 12:34:55 +00:00
|
|
|
GMQCC_DEFINE_FLAG(EMULATE_STATE)
|
2014-05-24 14:38:02 +00:00
|
|
|
GMQCC_DEFINE_FLAG(ARITHMETIC_EXCEPTIONS)
|
2014-10-18 11:49:13 +00:00
|
|
|
GMQCC_DEFINE_FLAG(SPLIT_VECTOR_PARAMETERS)
|
2018-05-10 01:18:37 +00:00
|
|
|
GMQCC_DEFINE_FLAG(DEFAULT_ERASEABLE)
|
2012-11-10 21:13:09 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* warning flags */
|
|
|
|
#ifdef GMQCC_TYPE_WARNS
|
2013-02-03 23:19:56 +00:00
|
|
|
GMQCC_DEFINE_FLAG(UNINITIALIZED_GLOBAL)
|
|
|
|
GMQCC_DEFINE_FLAG(DEBUG)
|
|
|
|
GMQCC_DEFINE_FLAG(UNUSED_VARIABLE)
|
2016-11-24 14:52:57 +00:00
|
|
|
GMQCC_DEFINE_FLAG(UNUSED_COMPONENT)
|
2013-02-03 23:19:56 +00:00
|
|
|
GMQCC_DEFINE_FLAG(USED_UNINITIALIZED)
|
|
|
|
GMQCC_DEFINE_FLAG(UNKNOWN_CONTROL_SEQUENCE)
|
|
|
|
GMQCC_DEFINE_FLAG(EXTENSIONS)
|
|
|
|
GMQCC_DEFINE_FLAG(FIELD_REDECLARED)
|
|
|
|
GMQCC_DEFINE_FLAG(MISSING_RETURN_VALUES)
|
|
|
|
GMQCC_DEFINE_FLAG(INVALID_PARAMETER_COUNT)
|
|
|
|
GMQCC_DEFINE_FLAG(LOCAL_SHADOWS)
|
|
|
|
GMQCC_DEFINE_FLAG(LOCAL_CONSTANTS)
|
|
|
|
GMQCC_DEFINE_FLAG(VOID_VARIABLES)
|
|
|
|
GMQCC_DEFINE_FLAG(IMPLICIT_FUNCTION_POINTER)
|
|
|
|
GMQCC_DEFINE_FLAG(VARIADIC_FUNCTION)
|
|
|
|
GMQCC_DEFINE_FLAG(FRAME_MACROS)
|
|
|
|
GMQCC_DEFINE_FLAG(EFFECTLESS_STATEMENT)
|
|
|
|
GMQCC_DEFINE_FLAG(END_SYS_FIELDS)
|
|
|
|
GMQCC_DEFINE_FLAG(ASSIGN_FUNCTION_TYPES)
|
|
|
|
GMQCC_DEFINE_FLAG(CPP)
|
|
|
|
GMQCC_DEFINE_FLAG(MULTIFILE_IF)
|
|
|
|
GMQCC_DEFINE_FLAG(DOUBLE_DECLARATION)
|
|
|
|
GMQCC_DEFINE_FLAG(CONST_VAR)
|
|
|
|
GMQCC_DEFINE_FLAG(MULTIBYTE_CHARACTER)
|
|
|
|
GMQCC_DEFINE_FLAG(TERNARY_PRECEDENCE)
|
|
|
|
GMQCC_DEFINE_FLAG(UNKNOWN_PRAGMAS)
|
|
|
|
GMQCC_DEFINE_FLAG(UNREACHABLE_CODE)
|
|
|
|
GMQCC_DEFINE_FLAG(UNKNOWN_ATTRIBUTE)
|
|
|
|
GMQCC_DEFINE_FLAG(RESERVED_NAMES)
|
|
|
|
GMQCC_DEFINE_FLAG(UNINITIALIZED_CONSTANT)
|
|
|
|
GMQCC_DEFINE_FLAG(DIFFERENT_QUALIFIERS)
|
|
|
|
GMQCC_DEFINE_FLAG(DIFFERENT_ATTRIBUTES)
|
|
|
|
GMQCC_DEFINE_FLAG(DEPRECATED)
|
|
|
|
GMQCC_DEFINE_FLAG(PARENTHESIS)
|
2013-06-12 15:23:39 +00:00
|
|
|
GMQCC_DEFINE_FLAG(UNSAFE_TYPES)
|
2013-06-17 20:11:37 +00:00
|
|
|
GMQCC_DEFINE_FLAG(BREAKDEF)
|
2013-09-24 11:31:53 +00:00
|
|
|
GMQCC_DEFINE_FLAG(CONST_OVERWRITE)
|
2013-09-30 19:59:36 +00:00
|
|
|
GMQCC_DEFINE_FLAG(DIRECTIVE_INMACRO)
|
2013-11-23 11:57:40 +00:00
|
|
|
GMQCC_DEFINE_FLAG(BUILTINS)
|
2014-05-24 13:53:38 +00:00
|
|
|
GMQCC_DEFINE_FLAG(INEXACT_COMPARES)
|
2012-11-10 21:13:09 +00:00
|
|
|
#endif
|
|
|
|
|
2012-11-30 10:05:58 +00:00
|
|
|
#ifdef GMQCC_TYPE_OPTIMIZATIONS
|
2013-02-03 23:19:56 +00:00
|
|
|
GMQCC_DEFINE_FLAG(PEEPHOLE, 1)
|
|
|
|
GMQCC_DEFINE_FLAG(TAIL_RECURSION, 1)
|
|
|
|
GMQCC_DEFINE_FLAG(OVERLAP_LOCALS, 3)
|
|
|
|
GMQCC_DEFINE_FLAG(LOCAL_TEMPS, 3)
|
|
|
|
GMQCC_DEFINE_FLAG(GLOBAL_TEMPS, 3)
|
|
|
|
GMQCC_DEFINE_FLAG(STRIP_CONSTANT_NAMES, 1)
|
|
|
|
GMQCC_DEFINE_FLAG(OVERLAP_STRINGS, 2)
|
|
|
|
GMQCC_DEFINE_FLAG(CALL_STORES, 3)
|
|
|
|
GMQCC_DEFINE_FLAG(VOID_RETURN, 1)
|
|
|
|
GMQCC_DEFINE_FLAG(VECTOR_COMPONENTS, 1)
|
2013-08-01 07:07:59 +00:00
|
|
|
GMQCC_DEFINE_FLAG(CONST_FOLD_DCE, 2)
|
2013-08-15 03:45:50 +00:00
|
|
|
GMQCC_DEFINE_FLAG(CONST_FOLD, 0) /* cannot be turned off */
|
2012-11-30 10:05:58 +00:00
|
|
|
#endif
|
|
|
|
|
2013-01-30 05:24:30 +00:00
|
|
|
#ifdef GMQCC_TYPE_OPTIONS
|
2013-02-03 23:19:56 +00:00
|
|
|
GMQCC_DEFINE_FLAG(O)
|
|
|
|
GMQCC_DEFINE_FLAG(OUTPUT)
|
|
|
|
GMQCC_DEFINE_FLAG(QUIET)
|
|
|
|
GMQCC_DEFINE_FLAG(G)
|
|
|
|
GMQCC_DEFINE_FLAG(STANDARD)
|
|
|
|
GMQCC_DEFINE_FLAG(DEBUG)
|
|
|
|
GMQCC_DEFINE_FLAG(DUMPFIN)
|
|
|
|
GMQCC_DEFINE_FLAG(DUMP)
|
|
|
|
GMQCC_DEFINE_FLAG(FORCECRC)
|
|
|
|
GMQCC_DEFINE_FLAG(FORCED_CRC)
|
|
|
|
GMQCC_DEFINE_FLAG(PP_ONLY)
|
|
|
|
GMQCC_DEFINE_FLAG(MAX_ARRAY_SIZE)
|
|
|
|
GMQCC_DEFINE_FLAG(ADD_INFO)
|
2013-09-12 21:06:20 +00:00
|
|
|
GMQCC_DEFINE_FLAG(PROGSRC)
|
2014-01-07 13:33:26 +00:00
|
|
|
GMQCC_DEFINE_FLAG(COVERAGE)
|
2014-04-08 12:34:55 +00:00
|
|
|
GMQCC_DEFINE_FLAG(STATE_FPS)
|
2013-01-30 05:24:30 +00:00
|
|
|
#endif
|
|
|
|
|
2012-11-10 21:13:09 +00:00
|
|
|
/* some cleanup so we don't have to */
|
|
|
|
#undef GMQCC_TYPE_FLAGS
|
|
|
|
#undef GMQCC_TYPE_WARNS
|
2013-01-30 05:24:30 +00:00
|
|
|
#undef GMQCC_TYPE_OPTIONS
|
2013-01-13 16:37:09 +00:00
|
|
|
#undef GMQCC_TYPE_OPTIMIZATIONS
|
2012-11-10 21:13:09 +00:00
|
|
|
#undef GMQCC_DEFINE_FLAG
|