Re: problems with identifiers and keywords...

Dave Thompson <david.thompson1@worldnet.att.net>
28 Nov 2004 23:19:23 -0500

          From comp.compilers

Related articles
[15 earlier articles]
Re: problems with identifiers and keywords... nmm1@cus.cam.ac.uk (2004-11-19)
Re: problems with identifiers and keywords... gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-11-19)
Re: problems with identifiers and keywords... gracjan@acchsh.nospam.com (Gracjan Polak) (2004-11-19)
Re: problems with identifiers and keywords... Martin.Ward@durham.ac.uk (Martin Ward) (2004-11-19)
Re: problems with identifiers and keywords... Peter_Flass@Yahoo.com (Peter Flass) (2004-11-20)
Re: problems with identifiers and keywords... genew@mail.ocis.net (Gene Wirchenko) (2004-11-20)
Re: problems with identifiers and keywords... david.thompson1@worldnet.att.net (Dave Thompson) (2004-11-28)
Re: problems with identifiers and keywords... cgweav@aol.com (2004-11-29)
Re: problems with identifiers and keywords... nmm1@cus.cam.ac.uk (2004-12-01)
Re: problems with identifiers and keywords... cdc@maxnet.co.nz (Carl Cerecke) (2004-12-01)
Re: problems with identifiers and keywords... gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-12-05)
Re: problems with identifiers and keywords... vbdis@aol.com (2004-12-05)
| List of all articles for this month |
From: Dave Thompson <david.thompson1@worldnet.att.net>
Newsgroups: comp.compilers
Date: 28 Nov 2004 23:19:23 -0500
Organization: AT&T Worldnet
References: 04-10-148 04-10-170 04-10-174 04-11-008 04-11-011 04-11-031 04-11-052
Keywords: syntax, design
Posted-Date: 28 Nov 2004 23:19:23 EST

On 17 Nov 2004 11:36:29 -0500, glen herrmannsfeldt
<gah@ugcs.caltech.edu> wrote:
<snip>
> The C language has relatively few keywords, but all the library
> function names are reserved.


Library function names are reserved within translation units (roughly
source files) if and only if the applicable standard header is
#include'd. E.g. fopen is reserved iff you #include <stdio.h>.


This implies that one standard header can't #include another just
because it would be convenient to share some of its contents e.g.
things like typedef size_t or #define NULL. OTOH _C++_ does allow any
standard C++ header to #include others, but (instead) its standard
headers put nearly everything in the std:: namespace so you can have
the same identifier in a (or the default) user namespace but you may
need (or want) to qualify uses of it.


All library function names are reserved _as external names_, meaning
at the linker level as always implemented although the standards can't
formally say so. This is pretty much inherent in traditional and still
pretty much(?) universal one-level linkers.


- David.Thompson1 at worldnet.att.net


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.