[comp.std.c] six-character extern id limit

karl@haddock.ima.isc.com (Karl Heuer) (09/24/88)

In article <169@isncr.is.se> ra@isncr.is.se (Robert Andersson) writes:
>The linker on the Honeywell Bull DPS6 minicomputers is limited to
>6-character uppercase-only externals, and the C-compiler [removes underscores
>and vowels in order to compress to six letters, thus unintentionally mapping
>strcomp() to the same name as strcmp().]

Fortunately, such an algorithm would not be legal in an ANSI C compiler.  An
implementation is allowed to restrict the significance to six characters, but
"any identifiers that differ in a significant character are different
identifiers" [3.1.2].

I hadn't noticed this before, but the rules imply that underscores must be
significant in external identifiers.  This would be a potential problem if the
linker doesn't allow underscores.  Are there any linkers that require symbol
names to be alphanumeric only?

Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint
Followups to comp.std.c.