Bug in Unix System V C compiler

gwyn at BRL-VLD.ARPA gwyn at BRL-VLD.ARPA
Thu Aug 9 06:03:09 AEST 1984


From:      Doug Gwyn (VLD/VMB) <gwyn at BRL-VLD.ARPA>

The restriction to 7 significant characters in a C symbol applies
only to static symbols, not auto or register variables.  The latter
have truncated symbols in the symbol table but the code generated
is correct, since it does not have to refer to the symbol name.
The extra character prepended to the symbol is ~ in this case, _
for externs.  The current PDP-11 (Ritchie) C compiler, as Ron
noted, warns whenever there is an important symbol clash, but
it is quiet in those cases where correct code will result.

A complete solution to the problem of using the 8 characters
at the assembler level would require that all `reserved' assembler
symbols be given a special form different from any possible
compiler-generated symbols, e.g. they could start with a .
This seems like too much work.  Another approach would be to
convert the PDP-11 to flexnames but for some unknown reason
this has not been done.



More information about the Comp.unix.wizards mailing list