http://qs321.pair.com?node_id=141792


in reply to OT (Zaxo) C Standard (was Rex2: Blowfish using Inline::C)
in thread Blowfish using Inline::C

One of those is that identifiers beginning with a single underscore have file scope. Effectively, they are private methods..

Note that the standard is referring to header files. I think that this means a header file can do something like:

static int _foo(void) { /* ... do stuff ... */ }
or like
struct _bar { /* ... */ };
or like
static int _baz;
(update: Of course, it's important to note that these definitions could be referred to in macros so "overriding" them, even if possible, would make code below the overriding not work.) And when you use XS (or Inline since that uses XS) you are probably indirectly using standard header files. So, if you use these names and the header files, you can have a serious problem with duplicated function names and such.

Also note the first bullet under 7.1.3 paragraph(?) 1. "All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use." This seems to mean that the C library may do weird things with those names. Take my C library implementation (glibc), for example. It defines numerous identifiers beginning with _IO for implementing stdio. Some of these even have external linkage, so if you use them with in a program, you could have conflicts linking in libc even if you never use the relevant header files. The standard seems to say the implementation need not worry about creating problems like this even for functions names like _Start or _Crypt.