What is the origin of the prepended underscore?

Chris Torek chris at umcp-cs.UUCP
Fri Sep 6 12:37:07 AEST 1985


>Why is an underscore commonly prepended to symbols generated by most C
>compilers?

The answer is so that variables like "r3" don't conflict with
registers like "r3", and so forth.  However, while it is no longer
important now that we have flexnames, I would like to take this
opportunity to wonder why the _ was not *ap*pended to external
symbols, giving one eight significant characters between .o files
instead of seven.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at maryland



More information about the Comp.unix.wizards mailing list