- if (!strcmp(argarg, "gmqcc") || !strcmp(argarg, "default"))
- opts_standard = COMPILER_GMQCC;
- else if (!strcmp(argarg, "qcc"))
- opts_standard = COMPILER_QCC;
- else if (!strcmp(argarg, "fte") || !strcmp(argarg, "fteqcc"))
- opts_standard = COMPILER_FTEQCC;
- else if (!strcmp(argarg, "qccx"))
- opts_standard = COMPILER_QCCX;
- else {
- printf("Unknown standard: %s\n", argarg);
+ if (!strcmp(argarg, "gmqcc") || !strcmp(argarg, "default")) {
+
+ opts_set(opts.flags, ADJUST_VECTOR_FIELDS, true);
+ opts_set(opts.flags, CORRECT_LOGIC, true);
+ opts_set(opts.flags, FALSE_EMPTY_STRINGS, false);
+ opts_set(opts.flags, TRUE_EMPTY_STRINGS, true);
+ opts_set(opts.flags, LOOP_LABELS, true);
+ opts_set(opts.flags, TRANSLATABLE_STRINGS, true);
+ opts_set(opts.flags, INITIALIZED_NONCONSTANTS, true);
+ opts_set(opts.werror, WARN_INVALID_PARAMETER_COUNT, true);
+ opts_set(opts.werror, WARN_MISSING_RETURN_VALUES, true);
+ opts.standard = COMPILER_GMQCC;
+
+ } else if (!strcmp(argarg, "qcc")) {
+
+ opts_set(opts.flags, ADJUST_VECTOR_FIELDS, false);
+ opts_set(opts.flags, ASSIGN_FUNCTION_TYPES, true);
+ opts.standard = COMPILER_QCC;
+
+ } else if (!strcmp(argarg, "fte") || !strcmp(argarg, "fteqcc")) {
+
+ opts_set(opts.flags, FTEPP, true);
+ opts_set(opts.flags, TRANSLATABLE_STRINGS, true);
+ opts_set(opts.flags, ADJUST_VECTOR_FIELDS, false);
+ opts_set(opts.flags, ASSIGN_FUNCTION_TYPES, true);
+ opts_set(opts.flags, CORRECT_TERNARY, false);
+ opts_set(opts.warn, WARN_TERNARY_PRECEDENCE, true);
+ opts.standard = COMPILER_FTEQCC;
+
+ } else if (!strcmp(argarg, "qccx")) {
+
+ opts_set(opts.flags, ADJUST_VECTOR_FIELDS, false);
+ opts.standard = COMPILER_QCCX;
+
+ } else {
+ con_out("Unknown standard: %s\n", argarg);