[Info-vax] Whither VMS?

Bob Eager rde42 at spamcop.net
Tue Oct 6 17:54:56 EDT 2009


On Tue, 06 Oct 2009 14:06:59 -0700, MetaEd wrote:

> On Oct 6, 3:29 pm, ChrisQ <m... at devnull.com> wrote:
>> I must be out of date. Have been programming C since about 1983 and
>> have never heard of C *library* function calls being reserved words
>> within the the C *compiler*.
>>
>> Perhaps someone could provide examples ?. Sounds like a lot of flannel
>> to me ;-)...
> 
> Here, let me Google that for you. ;-)
> 
> http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1336.pdf
> 
> See section 7.1.3. As I read it, a C library function identifier is a
> reserved word IFF the associated header file is included. No idea if
> this is enforced by any compilers. So, for example, you may define your
> own malloc() but you shall not also include <stdlib.h>. Also, as I read
> it, certain identifiers are reserved at all times, such as those
> beginning with double underscore.
> 
> Please note the cited document is a draft revision of the C99 standard.

But section 7 is in the *library* section, not the *language* section. As 
such, it's not a compiler restriction, but an entirely reasonable library 
one.

Clearly it's intended to indicate that 'mix and match' stuff is not a 
good idea. More to the point, it provides for the case where a 'user' 
malloc takes differing arguments, or behaves differently, and would thus 
interfere with the workings of the library.

None of this invalidates using your own strcpy, etc. if you want to.




-- 
Use the BIG mirror service in the UK:
 http://www.mirrorservice.org




More information about the Info-vax mailing list