gcc accepts the following code which clang rejects: -- int a0[__builtin_types_compatible_p(struct foo, const struct foo) ? 1 : -1]; -- Reported as problem compiling Dovecot.
From the gcc docs for __builtin_types_compatible_p: "This built-in function ignores top level qualifiers (e.g., const, volatile). For example, int is equivalent to const int."
Fixed here: http://llvm.org/viewvc/llvm-project?view=rev&revision=58079