From dad62a7e27fb7e8ea1eb51d6619fd534106417f1 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 25 Feb 2020 21:23:35 -0500 Subject: Revert "ir: Fix sizeOf comparison with ptr to zst" This reverts commit 89812217b4e5fee7e2851266c17c9d47204a1573. This caused #4560 --- src/analyze.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index 5ee5f44643..95b2c77129 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -1132,9 +1132,10 @@ Error type_val_resolve_zero_bits(CodeGen *g, ZigValue *type_val, ZigType *parent if (type_val->special != ConstValSpecialLazy) { assert(type_val->special == ConstValSpecialStatic); if ((type_val->data.x_type->id == ZigTypeIdStruct && - type_val->data.x_type->data.structure.resolve_loop_flag_zero_bits) || + type_val->data.x_type->data.structure.resolve_loop_flag_zero_bits) || (type_val->data.x_type->id == ZigTypeIdUnion && - type_val->data.x_type->data.unionation.resolve_loop_flag_zero_bits)) + type_val->data.x_type->data.unionation.resolve_loop_flag_zero_bits) || + type_val->data.x_type->id == ZigTypeIdPointer) { // Does a struct/union which contains a pointer field to itself have bits? Yes. *is_zero_bits = false; -- cgit v1.2.3