"__LINE__ and __FILE__ - (nf)"

Guy Harris guy at rlgvax.UUCP
Thu Nov 3 02:56:52 AEST 1983


__LINE__ and __FILE__ are evaluated by the pre-processor (they contain the
name of the source line and file, and not the line number of the file
actually handed to the compiler, so the pre-processor knows enough to give
them values).  They were stuck into the pre-processor when it was rewritten
(with a significant speedup) by John Reiser, and have been in every version
of the preprocessor since V7.  They are not documented, however, until System
V.  I'd use them anyway, although some compilers may not use the Bell
preprocessor and may not have implemented them; if they don't implement them,
they're going to have trouble with a lot of code (including the "assert"
macro) so they should implement them.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.lang.c mailing list