From: Dale Weiler Date: Fri, 29 Nov 2013 18:36:35 +0000 (-0500) Subject: Fixes X-Git-Tag: xonotic-v0.8.0~45 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ac7e1a557d6dde0fc201e74c23446a65d5b8a142;p=xonotic%2Fgmqcc.git Fixes --- diff --git a/ast.c b/ast.c index 1644e24..238d00a 100644 --- a/ast.c +++ b/ast.c @@ -1192,7 +1192,6 @@ ast_function* ast_function_new(lex_ctx_t ctx, const char *name, ast_value *vtype if (!vtype) { compile_error(ast_ctx(self), "internal error: ast_function_new condition 0"); goto cleanup; - } else if (vtype->hasvalue || vtype->expression.vtype != TYPE_FUNCTION) { } else if (vtype->hasvalue || vtype->expression.vtype != TYPE_FUNCTION) { compile_error(ast_ctx(self), "internal error: ast_function_new condition %i %i type=%i (probably 2 bodies?)", (int)!vtype, diff --git a/fold.c b/fold.c index a66b815..40580e4 100644 --- a/fold.c +++ b/fold.c @@ -706,10 +706,10 @@ static GMQCC_INLINE ast_expression *fold_intrin_isfinite(fold_t *fold, ast_value return fold_constgen_float(fold, isfinite(fold_immvalue_float(a))); } static GMQCC_INLINE ast_expression *fold_intrin_isinf(fold_t *fold, ast_value *a) { - return fold_constgen_float(fold, isinff(fold_immvalue_float(a))); + return fold_constgen_float(fold, isinf(fold_immvalue_float(a))); } static GMQCC_INLINE ast_expression *fold_intrin_isnan(fold_t *fold, ast_value *a) { - return fold_constgen_float(fold, isnanf(fold_immvalue_float(a))); + return fold_constgen_float(fold, isnan(fold_immvalue_float(a))); } static GMQCC_INLINE ast_expression *fold_intrin_isnormal(fold_t *fold, ast_value *a) { return fold_constgen_float(fold, isnormal(fold_immvalue_float(a))); diff --git a/gmqcc.h b/gmqcc.h index 4c1a881..76289da 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -75,7 +75,7 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \ #else # ifdef _MSC_VER /* conversion from 'int' to 'float', possible loss of data */ -# pragma warning(disable : 4244 ) +# pragma warning(disable : 4244) typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; @@ -965,15 +965,17 @@ typedef struct { extern opts_cmd_t opts; #define OPTS_GENERIC(f,i) (!! (((f)[(i)/32]) & (1<< (unsigned)((i)%32)))) + #define OPTS_FLAG(i) OPTS_GENERIC(opts.flags, (i)) #define OPTS_WARN(i) OPTS_GENERIC(opts.warn, (i)) #define OPTS_WERROR(i) OPTS_GENERIC(opts.werror, (i)) #define OPTS_OPTIMIZATION(i) OPTS_GENERIC(opts.optimization, (i)) + #define OPTS_OPTION_DUPED(X) (opts.options[X].allocated) -#define OPTS_OPTION_BOOL(X) (opts.options[X].data.b) -#define OPTS_OPTION_U16(X) (opts.options[X].data.u16) -#define OPTS_OPTION_U32(X) (opts.options[X].data.u32) -#define OPTS_OPTION_DUP(X) *(OPTS_OPTION_DUPED(X)=true, &(opts.options[X].data.str.p)) -#define OPTS_OPTION_STR(X) (opts.options[X].data.str.c) +#define OPTS_OPTION_BOOL(X) (opts.options[X].data.b) +#define OPTS_OPTION_U16(X) (opts.options[X].data.u16) +#define OPTS_OPTION_U32(X) (opts.options[X].data.u32) +#define OPTS_OPTION_STR(X) (opts.options[X].data.str.c) +#define OPTS_OPTION_DUP(X) *(OPTS_OPTION_DUPED(X)=true, &(opts.options[X].data.str.p)) #endif /*! GMQCC_HDR */