mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-30 15:41:12 +00:00
Fixes
This commit is contained in:
parent
ea801acdb8
commit
ac7e1a557d
3 changed files with 10 additions and 9 deletions
1
ast.c
1
ast.c
|
@ -1192,7 +1192,6 @@ ast_function* ast_function_new(lex_ctx_t ctx, const char *name, ast_value *vtype
|
||||||
if (!vtype) {
|
if (!vtype) {
|
||||||
compile_error(ast_ctx(self), "internal error: ast_function_new condition 0");
|
compile_error(ast_ctx(self), "internal error: ast_function_new condition 0");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else if (vtype->hasvalue || vtype->expression.vtype != TYPE_FUNCTION) {
|
|
||||||
} 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?)",
|
compile_error(ast_ctx(self), "internal error: ast_function_new condition %i %i type=%i (probably 2 bodies?)",
|
||||||
(int)!vtype,
|
(int)!vtype,
|
||||||
|
|
4
fold.c
4
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)));
|
return fold_constgen_float(fold, isfinite(fold_immvalue_float(a)));
|
||||||
}
|
}
|
||||||
static GMQCC_INLINE ast_expression *fold_intrin_isinf(fold_t *fold, ast_value *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) {
|
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) {
|
static GMQCC_INLINE ast_expression *fold_intrin_isnormal(fold_t *fold, ast_value *a) {
|
||||||
return fold_constgen_float(fold, isnormal(fold_immvalue_float(a)));
|
return fold_constgen_float(fold, isnormal(fold_immvalue_float(a)));
|
||||||
|
|
6
gmqcc.h
6
gmqcc.h
|
@ -75,7 +75,7 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \
|
||||||
#else
|
#else
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
/* conversion from 'int' to 'float', possible loss of data */
|
/* conversion from 'int' to 'float', possible loss of data */
|
||||||
# pragma warning(disable : 4244 )
|
# pragma warning(disable : 4244)
|
||||||
|
|
||||||
typedef unsigned __int8 uint8_t;
|
typedef unsigned __int8 uint8_t;
|
||||||
typedef unsigned __int16 uint16_t;
|
typedef unsigned __int16 uint16_t;
|
||||||
|
@ -965,15 +965,17 @@ typedef struct {
|
||||||
extern opts_cmd_t opts;
|
extern opts_cmd_t opts;
|
||||||
|
|
||||||
#define OPTS_GENERIC(f,i) (!! (((f)[(i)/32]) & (1<< (unsigned)((i)%32))))
|
#define OPTS_GENERIC(f,i) (!! (((f)[(i)/32]) & (1<< (unsigned)((i)%32))))
|
||||||
|
|
||||||
#define OPTS_FLAG(i) OPTS_GENERIC(opts.flags, (i))
|
#define OPTS_FLAG(i) OPTS_GENERIC(opts.flags, (i))
|
||||||
#define OPTS_WARN(i) OPTS_GENERIC(opts.warn, (i))
|
#define OPTS_WARN(i) OPTS_GENERIC(opts.warn, (i))
|
||||||
#define OPTS_WERROR(i) OPTS_GENERIC(opts.werror, (i))
|
#define OPTS_WERROR(i) OPTS_GENERIC(opts.werror, (i))
|
||||||
#define OPTS_OPTIMIZATION(i) OPTS_GENERIC(opts.optimization, (i))
|
#define OPTS_OPTIMIZATION(i) OPTS_GENERIC(opts.optimization, (i))
|
||||||
|
|
||||||
#define OPTS_OPTION_DUPED(X) (opts.options[X].allocated)
|
#define OPTS_OPTION_DUPED(X) (opts.options[X].allocated)
|
||||||
#define OPTS_OPTION_BOOL(X) (opts.options[X].data.b)
|
#define OPTS_OPTION_BOOL(X) (opts.options[X].data.b)
|
||||||
#define OPTS_OPTION_U16(X) (opts.options[X].data.u16)
|
#define OPTS_OPTION_U16(X) (opts.options[X].data.u16)
|
||||||
#define OPTS_OPTION_U32(X) (opts.options[X].data.u32)
|
#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_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 */
|
#endif /*! GMQCC_HDR */
|
||||||
|
|
Loading…
Reference in a new issue