Whole document tree
1.4.9 Newlines in Macro ArgumentsTraditional macro processing carries forward all newlines in macro arguments into the expansion of the macro. This means that, if some of the arguments are substituted more than once, or not at all, or out of order, newlines can be duplicated, lost, or moved around within the expansion. If the expansion consists of multiple statements, then the effect is to distort the line numbers of some of these statements. The result can be incorrect line numbers, in error messages or displayed in a debugger. The GNU C preprocessor operating in ANSI C mode adjusts appropriately for multiple use of an argument--the first use expands all the newlines, and subsequent uses of the same argument produce no newlines. But even in this mode, it can produce incorrect line numbering if arguments are used out of order, or not used at all. Here is an example illustrating this problem:
The syntax error triggered by the tokens `syntax error' results in an error message citing line four, even though the statement text comes from line five. This document was generated by root on January, 30 2002 using texi2html |