This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11157] __block is a reserved word with clang -fblocks


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]