gwlib_obj := $(filter-out src/main.o, ${GW_OBJ})
CFLAGS += -Iinclude
+
+ifeq (${BUILD_ON_WINDOWS}, 1)
+ifeq (${CC}, gcc)
+LDFLAGS += -lm
+endif
+else
LDFLAGS += -lm
+endif
ifeq ($(shell uname), Linux)
LDFLAGS += -lrt -rdynamic
OP_CHECK(opck_const_rhs) {
const Exp_Binary* bin = (Exp_Binary*)data;
+printf("rhs %p %i\n", bin->rhs, bin->rhs->meta);
if(bin->rhs->meta != ae_meta_var)
- ERR_N(exp_self(bin)->pos, _("cannot assign '%s' on types '%s' and '%s'.\n"
+ ERR_N(bin->rhs->pos, _("cannot assign '%s' on types '%s' and '%s'.\n"
" ... (reason: --- right-side operand is %s.)"),
op2str(bin->op), bin->lhs->type->name, bin->rhs->type->name,
access(bin->rhs->meta))
static OP_CHECK(opck_ptr_deref) {
const Exp_Unary* unary = (Exp_Unary*)data;
- exp_self(unary)->type = nspc_lookup_type1(unary->exp->type->e->owner, insert_symbol(env->gwion->st, get_type_name(env, unary->exp->type->name, 1)));
- return exp_self(unary)->type;
+ return exp_self(unary)->type = nspc_lookup_type1(unary->exp->type->e->owner, insert_symbol(env->gwion->st, get_type_name(env, unary->exp->type->name, 1)));
}
static OP_CHECK(opck_implicit_ptr) {
.data=(uintptr_t)unary, .pos=exp_self(unary)->pos };
if(unary->exp && !opi.rhs)
return NULL;
- const Type t = op_check(env, &opi);
- if(t && isa(t, t_object) < 0)
- exp_self(unary)->meta = ae_meta_value;
- return t;
+ return op_check(env, &opi);
}
ANN static Type check_exp_if(const Env env, const Exp_If* exp_if) {