diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-02-25 12:22:21 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-02-25 12:48:08 +0100 |
| commit | b46efcde82436e73c73dab132f73aeff98673894 (patch) | |
| tree | eac09fdcc87897192b050975c2eb2a6dfccc6084 /src | |
| parent | 26b2e5fda86fe5424ebf86924d294d8dbb972eb6 (diff) | |
| download | zig-b46efcde82436e73c73dab132f73aeff98673894.tar.gz zig-b46efcde82436e73c73dab132f73aeff98673894.zip | |
ir: Fix sizeOf comparison with ptr to zst
Closes #4536
Diffstat (limited to 'src')
| -rw-r--r-- | src/analyze.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 95b2c77129..5ee5f44643 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -1132,10 +1132,9 @@ 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->id == ZigTypeIdPointer) + type_val->data.x_type->data.unionation.resolve_loop_flag_zero_bits)) { // Does a struct/union which contains a pointer field to itself have bits? Yes. *is_zero_bits = false; |
