diff options
| -rw-r--r-- | compile-i386.c | 18 | ||||
| -rw-r--r-- | evaluate.c | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/compile-i386.c b/compile-i386.c index f8e2e61a..70253b70 100644 --- a/compile-i386.c +++ b/compile-i386.c @@ -1759,7 +1759,7 @@ static void emit_loop(struct statement *stmt) static struct storage *x86_statement(struct statement *stmt) { if (!stmt) - return 0; + return NULL; switch (stmt->type) { case STMT_RETURN: return emit_return_stmt(stmt); @@ -2090,14 +2090,14 @@ static void x86_initializer_expr(struct expression *expr, struct symbol *ctype) static struct storage *x86_expression(struct expression *expr) { if (!expr) - return 0; + return NULL; if (!expr->ctype) { struct position *pos = &expr->pos; printf("\tno type at %s:%d:%d\n", input_streams[pos->stream].name, pos->line, pos->pos); - return 0; + return NULL; } switch (expr->type) { @@ -2122,7 +2122,7 @@ static struct storage *x86_expression(struct expression *expr) case EXPR_DEREF: case EXPR_SIZEOF: warn(expr->pos, "invalid expression after evaluation"); - return 0; + return NULL; case EXPR_CAST: return emit_cast_expr(expr); case EXPR_VALUE: @@ -2145,16 +2145,16 @@ static struct storage *x86_expression(struct expression *expr) // valid as sub-expressions of initializers. case EXPR_POS: warn(expr->pos, "unable to show plain initializer position expression"); - return 0; + return NULL; case EXPR_IDENTIFIER: warn(expr->pos, "unable to show identifier expression"); - return 0; + return NULL; case EXPR_INDEX: warn(expr->pos, "unable to show index expression"); - return 0; + return NULL; case EXPR_TYPE: warn(expr->pos, "unable to show type expression"); - return 0; + return NULL; } - return 0; + return NULL; } @@ -789,7 +789,7 @@ static struct symbol *evaluate_assignment(struct expression *expr) if (expr->op != '=') { rtype = evaluate_binop_assignment(expr, left, right); if (!rtype) - return 0; + return NULL; right = expr->right; } @@ -801,7 +801,7 @@ static struct symbol *evaluate_assignment(struct expression *expr) rtype = degenerate(right); if (!compatible_assignment_types(expr, ltype, &expr->right, rtype, "assignment")) - return 0; + return NULL; if (ltype->type == SYM_NODE) ltype->ctype.modifiers |= MOD_ASSIGNED; @@ -1165,12 +1165,12 @@ static struct symbol *evaluate_sizeof(struct expression *expr) size = expr->cast_type->bit_size; } else { if (!evaluate_expression(expr->cast_expression)) - return 0; + return NULL; size = expr->cast_expression->ctype->bit_size; } if (size & 7) { warn(expr->pos, "cannot size expression"); - return 0; + return NULL; } expr->type = EXPR_VALUE; expr->value = size >> 3; |
