Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!sun-barr!decwrl!shlump.dec.com!mountn.dec.com!minow From: minow@mountn.dec.com (Martin Minow) Newsgroups: comp.std.c Subject: Re: Reserved names in ANSI C Summary: [A-Za-z][A-Za-z0-9_]* with optional leading underscores Message-ID: <316@mountn.dec.com> Date: 21 Jun 89 18:35:38 GMT References: <13680@haddock.ima.isc.com> <1598@cbnewsh.ATT.COM> <875@cbnewsl.ATT.COM> Reply-To: minow%thundr.dec@decwrl.dec.com (Martin Minow) Organization: Digital Equipment Corporation Lines: 23 Kenneth Almquist asks what namespace is reserved by Ansi C. Several people responded with various lexical patterns. Unfortunately, none of the Drafts I've seen ever specified the totality of the namespace. We know that the C keywords and anything beginning with underscore are reserved, but there does not seem to be a limit on the library namespace. When I complained about this in one of the public reviews, I was told that this was for "Posix compliance." I suspect that the namespace will continue to grow without bound, and the best you can do to avoid polluting (or being polluted) is to define all of your variables using some "private" initial sequence: extern int my_private_global_foo; static int my_private_local_bar; (I have much the same problem on the Macintosh, and define all of my variables in lower-case with an embedded underscore to avoid Macintosh system definitions, most of which use mixed case without underscores.) Martin Minow minow%thundr.dec@decwrl.dec.com The above does not represent the position of Digital Equipment Corporation.