Line length (was Re: "Broken" compilers)

diamond@tkovoa diamond at tkou02.enet.dec.com
Mon May 7 12:18:57 AEST 1990


In article <1374 at sdrc.UUCP> scjones at sdrc.UUCP (Larry Jones) writes:
>In article <1626 at tkou02.enet.dec.com>, diamond at tkou02.enet.dec.com (diamond at tkovoa) writes:
>>In article <1990Apr26.125851.20728 at contact.uucp> ross at contact.UUCP (Ross Ridge) writes:
>>>The macro a expands to 5 517 094 707 031 349 characters.
>>Yeah, I thought that was greater than 509.
>If you check the phases of translation, however, logical lines
>are a well-defined concept that occur BEFORE macro expansion.
>Since the preprocessor grammar is token based, the result of
>preprocessing is a stream of tokens, not logical lines, so the
>size of the result is not subject to the logical line length
>limit!

In Phase 3, "... decomposed into preprocessing tokens ... New-line
characters are retained."  So logical lines exist even after
tokenizing.  When do new-line characters go away?  In Pase 7,
"White-space characters separating tokens are no longer significant."

It seems that Tom Plum's letter to me agreed with the rules of the
standard, and the limit applies after macro expansion (as well as
before).  These rules were not overridden by an example (half-sarcasm
here), and no one has quoted an official interpretation.

-- 
Norman Diamond, Nihon DEC     diamond at tkou02.enet.dec.com
This_blank_intentionally_left_underlined________________________________________



More information about the Comp.std.c mailing list