six-character extern id limit

Karl Heuer karl at haddock.ima.isc.com
Sat Sep 24 06:11:57 AEST 1988


In article <169 at isncr.is.se> ra at 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 at haddock.isc.com), The Walking Lint
Followups to comp.std.c.



More information about the Comp.std.c mailing list