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 Tanktalus at gmail dot com  2010-04-06 23:31 -------
http://web.archive.org/web/20040209031039/http://oakroadsystems.com/tech/c-predef.htm#ReservedIdentifiers
seems to disagree with you.  The C standard also disagrees with you: anything
starting with an underscore is reserved to the compiler.  The compiler is free
to create new anything that starts with an underscore.

Just googling for "reserved identifiers c" also shows
http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/index.jsp?topic=/com.ibm.vacpp7a.doc/language/ref/clrc02reserved_identifiers.htm
- IBM's compiler also says "Identifiers that begin with an underscore are
reserved as identifiers with file scope in both the ordinary and tag name
spaces."  Since "__block" starts with an underscore, it's reserved for the compiler.

Googling for "reserved identifiers c gnu" shows
http://www.gnu.org/s/libc/manual/html_node/Reserved-Names.html, for the gnu C
compiler, which says "all identifiers regardless of use that begin with either
two underscores or an underscore followed by a capital letter are reserved
names. This is so that the library and header files can define functions,
variables, and macros for internal purposes without risk of conflict with names
in user programs."  In other words, your use of __block is a conflict and should
be changed, just to fit with GNU C.

Basically, these are reserved specifically so that the compilers can define new
identifiers without stealing by reserving in advance everything that starts with
an underscore.

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