Fwd: [Bug libc/11157] __block is a reserved word with clang -fblocks
Good news: it appears that the glibc maintainers have accepted a patch to allow the use of __block as a Clang keyword. This should make it easier to build libdispatch and programs that use the Blocks compiler extension. ---------- Forwarded message ---------- From: carlos at redhat dot com <sourceware-bugzilla@sourceware.org> Date: Thu, Nov 21, 2013 at 5:06 PM Subject: [Bug libc/11157] __block is a reserved word with clang -fblocks To: mark@heily.com https://sourceware.org/bugzilla/show_bug.cgi?id=11157 Carlos O'Donell <carlos at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carlos at redhat dot com Resolution|WONTFIX |FIXED --- Comment #10 from Carlos O'Donell <carlos at redhat dot com> --- Fixed. commit 84ae135d3282dc362bed0a5c9a575319ef336884 Author: Meador Inge <meadori@codesourcery.com> Date: Thu Nov 21 16:57:37 2013 -0500 Use __glibc_block in public headers. As detailed in PR11157, the use of '__block' is known to interfere with keywords in some environments, such as the Clang -fblocks extension. Recently a similar issue was raised concerning the use of '__unused' and a '__glibc' prefix was proposed to create a glibc implementation namespace for these sorts of issues [1]. This patches takes that approach. [1] https://sourceware.org/ml/libc-alpha/2012-02/msg00047.html [2] http://lists.debian.org/debian-glibc/2013/11/msg00020.html -- You are receiving this mail because: You are on the CC list for the bug.
Il 26/11/2013 01:18, Mark Heily ha scritto:
Good news: it appears that the glibc maintainers have accepted a patch to allow the use of __block as a Clang keyword. This should make it easier to build libdispatch and programs that use the Blocks compiler extension.
FWIW, I still believe this was a Clang bug. You could count on the maintainers to do this in the case of glibc, but what if Microsoft does the same? GCC has a fixincludes tool that works around incompatibilities or namespace clashes between system headers and the compiler. Does Clang have anything like that? If so, why did the bug have to be fixed in glibc? Paolo
participants (2)
-
Mark Heily
-
Paolo Bonzini