# C backend: fix lowering comparison when array ptr meets ptr · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/badad16f88ac7e1eb84eadf76e13b4dc346d4ced)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: badad16f88ac7e1eb84eadf76e13b4dc346d4ced

Requested commit: badad16f88ac7e1eb84eadf76e13b4dc346d4ced

Commit: badad16f88ac7e1eb84eadf76e13b4dc346d4ced

Tree: 990033e793deb56107339304d52fe8ce8bbdfbb3

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
C backend: fix lowering comparison when array ptr meets ptr

Pointer comparisons were triggering `-Wcompare-distinct-pointer-types`
before this fix, which adds `(void*)` casts if the lhs type and rhs type
do not match pointer sizeness.

```

## Parents

- [401b7f6f537699771ddbc82d524439c5f3db7ea7](https://git.cafe/gitcafe/zig/commit/401b7f6f537699771ddbc82d524439c5f3db7ea7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/badad16f88ac7e1eb84eadf76e13b4dc346d4ced?format=markdown)
