diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-02-25 21:23:35 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-02-25 21:23:35 -0500 |
| commit | dad62a7e27fb7e8ea1eb51d6619fd534106417f1 (patch) | |
| tree | e13adf5b92f39b686f96dfcf1f788405f1c261d1 /src/analyze.cpp | |
| parent | e9bac8be6b45434f107d2a0d8d4f8fd16de185c6 (diff) | |
| download | zig-dad62a7e27fb7e8ea1eb51d6619fd534106417f1.tar.gz zig-dad62a7e27fb7e8ea1eb51d6619fd534106417f1.zip | |
Revert "ir: Fix sizeOf comparison with ptr to zst"
This reverts commit 89812217b4e5fee7e2851266c17c9d47204a1573.
This caused #4560
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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; |
