jyknight added a comment. In https://reviews.llvm.org/D34294#782806, @krytarowski wrote:
> New one is harder to comprehend and less portable (usage of `__atribute__`). I can't disagree more strongly. This is fundamentally portable C++ code -- __attribute__((unused)) is simply warning suppression. I used it directly, because I saw other .cpp files in libcxx already did so. If it needs to be conditioned, it could be. > Or better: > #elif __GLIBC__ || (__ANDROID_API__ - 0) >= 23 > If I understand correctly, Android adopted GNU version. No, we can't use that conditional, because android and glibc aren't the only ones to have adopted the GNU variant. As I mentioned, newlib uses it also. We *may* be able to use a different conditional than what's there or what you suggested, but solving the problem once and for all by using the function type is certainly a better solution. https://reviews.llvm.org/D34294 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits