length_of align_of size_of are no longer operators but function calls
This commit is contained in:
@@ -362,9 +362,10 @@ gen_expr(Ast_Expr *ast, Ast_Type *type_of_var){
|
||||
BREAK();
|
||||
}
|
||||
|
||||
CASE(LENGTH_OF, Builtin){
|
||||
gen_expr(node->expr);
|
||||
if(is_pointer(node->expr->resolved_type))
|
||||
CASE(LENGTH_OF, Call){
|
||||
Ast_Expr *expr = unpack_ast_call_expr_for_builtin(node);
|
||||
gen_expr(expr);
|
||||
if(is_pointer(expr->resolved_type))
|
||||
gen("->len");
|
||||
else gen(".len");
|
||||
BREAK();
|
||||
|
||||
Reference in New Issue
Block a user