X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=gmqcc.h;h=51c2dccbdc1dc41a8e7d5b4916292d79f7dc14f5;hb=ddb0be6c0a7954c161521a01c5fe1d83cd14b1ac;hp=dd5dbc7f9d75369afbf04e7b6db0b8172530aa38;hpb=98fd5cd429efba365da12578cd861012fb1749b5;p=xonotic%2Fgmqcc.git diff --git a/gmqcc.h b/gmqcc.h index dd5dbc7..51c2dcc 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -102,8 +102,10 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \ */ #if defined(__GNUC__) || defined(__CLANG__) # define GMQCC_WARN __attribute__((warn_unused_result)) +# define GMQCC_USED __attribute__((used)) #else # define GMQCC_WARN +# define GMQCC_USED #endif /* * This is a hack to silent clang regarding empty @@ -451,7 +453,8 @@ GMQCC_INLINE FILE *file_open (const char *, const char *); /*=========================== correct.c =============================*/ /*===================================================================*/ typedef struct { - char ***edits; + char ***edits; + size_t **lens; } correction_t; void correct_del (correct_trie_t*, size_t **); @@ -681,17 +684,11 @@ enum { INSTR_BITAND, INSTR_BITOR, - /* - * Virtual instructions used by the assembler - * keep at the end but before virtual instructions - * for the IR below. - */ - AINSTR_END, - /* * Virtual instructions used by the IR * Keep at the end! */ + VINSTR_END, VINSTR_PHI, VINSTR_JUMP, VINSTR_COND, @@ -1133,14 +1130,13 @@ enum { }; -static const char *opts_options_descriptions[] = { +GMQCC_USED static const char *opts_options_descriptions[] = { # define GMQCC_TYPE_OPTIONS # define GMQCC_DEFINE_FLAG(X, Y) Y, # include "opts.def" - "" + "" }; - extern unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS]; /* other options: */ @@ -1151,13 +1147,6 @@ typedef enum { COMPILER_GMQCC /* this QuakeC */ } opts_std_t; -typedef enum { - OPT_TYPE_BOOL, - OPT_TYPE_U16, - OPT_TYPE_U32, - OPT_TYPE_STR -} opt_type_t; - typedef union { bool B; uint16_t U16;