3 ms·
Here are some examples that we've run into in the past: Some of our code used GCC nested functions, which Clang did not support. We were using __sync_val_comp
by inglorion 13y ago
Here are some examples that we've run into in the past:
Some of our code used GCC nested functions, which Clang did not support.
We were using __sync_val_compare_and_swap with __int128 values, which wasn't supported by the Clang version we were using. I believe the current version of Clang supports this.
Clang is stricter about some things than GCC, e.g. Clang doesn't like it when you declare a class as struct in one place and in a class in another place.
I think there is also a difference where Clang deduces that your enum is unsigned if none of its declared values are negative, and warns you if you compare it < 0. Since we compile with -Werror, this will cause compilation to fail.
None of these are unsurmountable, but they do mean we can't just drop in Clang and expect everything to work.