goudreau@dg-rtp.dg.com (Bob Goudreau) (11/15/89)
In article <6622@portia.Stanford.EDU> karish@forel.stanford.edu (Chuck Karish) writes: > > Under ANSI C, _LOW, _HIGH, __s, and __v are all reserved to the > library implementor if they're external identifiers, because they > all start with underscores. In any standard header, they'll > become externals when the header is #included with external scope. > > The question now becomes, is the header part of the library > implementation or not? If any compiler other than the native one > will use these headers, the answer had best be `not'. > > These identifiers are OK with file scope or smaller inside a C > library implementation, but not as external identifiers. Here's what the Dec. 7, 1988 ANSI draft says about the matter: 4.1.2.1 Reserved Identifiers Each header declares or defines all identifiers listed in its associated section, and optionally declares or defines identifiers listed in its associated future library directions section and identifiers which are always reserved either for any use or for use as file scope identifiers. + All identifiers that begin with an underscore and either an upper-case letter or another underscore are always reserved for any use. + All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary identifier and tag name spaces. .... Since _LOW, _HIGH, __s and __v all fall into the first category ("always reserved for any use"), the implementation is free to do what it wants with them. But note that if _s had been used instead of __s, only the second category would have applied. ------------------------------ Bob Goudreau +1 919 248 6231 Data General Corporation ...!mcnc!rti!xyzzy!goudreau 62 Alexander Drive goudreau@dg-rtp.dg.com Research Triangle Park, NC 27709, USA