[cfe-dev] Clang and glibc 2.25 incompatibilities?
Richard Smith via cfe-dev
cfe-dev at lists.llvm.org
Sat Apr 1 10:27:50 PDT 2017
On 1 Apr 2017 6:59 am, "Philippe Proulx via cfe-dev" <cfe-dev at lists.llvm.org>
wrote:
On Sat, Apr 1, 2017 at 12:42 PM, Joerg Sonnenberger via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> On Sat, Apr 01, 2017 at 10:31:54AM -0400, Philippe Proulx via cfe-dev
wrote:
>> Why does Clang define __GNUC__ by default?
>
> Because it creates less problems than the alternatives. There is a lot
> of code in the wild that essentially assumes a random version of gcc for
> a lot of code. Given that Clang is implementing almost all the GCC
> extensions of GCC 4.2.1, it claims to be that version. It means a bit
> more work for newer code, but avoids breaking a lot of older code.
>
>> What's the real solution here?
>
> Create a bug report against glibc.
Is it really a glibc issue? The header uses a GNU statement expression
when __GNUC__ is defined. Clang defines __GNUC__, but with -pedantic
it complains that I'm using a GNU extension. In other words Clang pretends
to be GCC by default, but complains when exposed to GCC extensions.
I don't think glibc is doing anything wrong here.
It is. This is also an incorrect definition for C++11, where assert(true)
is required to be a constant expression.
Phil
>
> Joerg
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170401/73963579/attachment.html>
More information about the cfe-dev
mailing list