This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11157] __block is a reserved word with clang -fblocks
- From: "truls dot becken at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 25 Jan 2010 21:36:25 -0000
- Subject: [Bug libc/11157] __block is a reserved word with clang -fblocks
- References: <20100110175229.11157.truls.becken@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From truls dot becken at gmail dot com 2010-01-25 21:36 -------
This is an absolutely ridiculous attitude. The C standard (section 17.4.3.1.2) reserves identifiers that start with an
underscore for the implementation. There are two cases when it is acceptable to use them:
- As public symbols exported by libc.
- As keywords for non-standard compiler extensions.
By convention, double underscores are reserved for the compiler, single underscores for the libc. All C compilers add
extensions that begin with double underscores. GCC defines some like __asm, Microsoft's C compiler defines some for
SEH, Clang supports most of the GCC ones and __block.
Using them as parameter names in the header is entirely wrong and is not guaranteed to work on any standards-
compliant compiler. If glibc exported a __block function or global variable, then your attitude would make sense, but
you are using __block as an identifier in a context that is explicitly not supported by the standard.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WONTFIX |
http://sourceware.org/bugzilla/show_bug.cgi?id=11157
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.