# zig.h: do not assume \_\_GNUC\_\_ is not clang · gitcafe/zig

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

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

Visibility: public

Requested revision: 176940b5045ff0c9b20f9951dca34b2a1bb7edc0

Requested commit: 176940b5045ff0c9b20f9951dca34b2a1bb7edc0

Commit: 176940b5045ff0c9b20f9951dca34b2a1bb7edc0

Tree: e3fff85e35287cf106f194ec55b512d823f35d6b

Author: Michael Dusan

Committer: Andrew Kelley

## Message

```
zig.h: do not assume __GNUC__ is not clang

A followup to 5bd69c655d9e04102c8a64ced1215c9d69f4f03f .

For compatibility purposes clang defines __GNUC__. This broke logic
where clang14 __has_builtin returns false but `|| defined(__GNUC__)`
made it true.

CI did not catch this because it uses clang15. However, bootstrapping
with latest apple compiler is clang14. We also want to support older
clang.

```

## Parents

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

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