]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
-O now, additionally to taking a number, can work like -W and -f to take an actual...
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index 44095a0958185e025853d70c425a795ddcfca61e..459c2ff0cf83ff37bff2d55e902bd1cf3a73da2e 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -877,6 +877,25 @@ static const opts_flag_def opts_warn_list[] = {
     { NULL, LONGBIT(0) }
 };
 
+enum {
+# define GMQCC_TYPE_OPTIMIZATIONS
+# define GMQCC_DEFINE_FLAG(NAME, MIN_O) OPTIM_##NAME,
+#  include "opts.def"
+    COUNT_OPTIMIZATIONS
+};
+static const opts_flag_def opts_opt_list[] = {
+# define GMQCC_TYPE_OPTIMIZATIONS
+# define GMQCC_DEFINE_FLAG(NAME, MIN_O) { #NAME, LONGBIT(OPTIM_##NAME) },
+#  include "opts.def"
+    { NULL, LONGBIT(0) }
+};
+static const unsigned int opts_opt_oflag[] = {
+# define GMQCC_TYPE_OPTIMIZATIONS
+# define GMQCC_DEFINE_FLAG(NAME, MIN_O) MIN_O,
+#  include "opts.def"
+    0
+};
+
 /* other options: */
 enum {
     COMPILER_QCC,     /* circa  QuakeC */
@@ -902,5 +921,7 @@ extern size_t      opts_max_array_size;
 extern uint32_t opts_flags[1 + (COUNT_FLAGS / 32)];
 #define OPTS_WARN(i) (!! (opts_warn[(i)/32] & (1<< ((i)%32))))
 extern uint32_t opts_warn[1 + (COUNT_WARNINGS / 32)];
+#define OPTS_OPTIMIZATION(i) (!! (opts_optimization[(i)/32] & (1<< ((i)%32))))
+extern uint32_t opts_optimization[1 + (COUNT_OPTIMIZATIONS / 32)];
 
 #endif