diff --git a/Makefile b/Makefile index 498ab38..34b7e52 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CC=gcc -CFLAGS=-Wall -pedantic -g -DUNIX_HOST +CFLAGS=-Wall -pedantic -g -DUNIX_HOST -DNATIVE_POINTERS LIBS=#-lm TARGET = picoc diff --git a/expression.c b/expression.c index 4d5600e..7f96da0 100644 --- a/expression.c +++ b/expression.c @@ -274,7 +274,7 @@ void ExpressionAssignToPointer(struct ParseState *Parser, struct Value *ToValue, else if (AllowPointerCoercion && IS_NUMERIC_COERCIBLE(FromValue)) { /* assign integer to native pointer */ - ToValue->Val->NativePointer = COERCE_INTEGER(FromValue); + ToValue->Val->NativePointer = (void *)COERCE_INTEGER(FromValue); } #endif else