not-quite free-format

Chuq Von Rospach chuqui at cae780.UUCP
Thu Nov 17 09:40:04 AEST 1983

I just found a situation where the supposedly free format language C isn't!
If you take the code segment:
    #define foo(x,y,z, \
		a,b) \

you get the wonderfully self-explanatory (as described by cc(1)) error
message 'formal error \'. It turns out that you cannot break up the
parameter list of a macro onto multiple lines, even if you do so at places
where the normally logical compiler should let you. One of the local
affcianados told me that its because it is the pre-processor, not the
compiler, and therefore doesn't have to be free-format. Since in reality it
is almost impossible to live hacking C without cpp, this really isn't a
reasonable answer, since anything in cpp that restricts free-formatting
also restricts the language itself. Someone want to conjecture why this
(seemingly arbitrary) restriction is here (laziness by the cpp author is
not admittable in court, although it may be the real reason), and why it
doesn't seem to be documented?

>From the dungeons of the warlock:			amd70!cae780!chuqui
		Chuqui the Plaid			*pif*

More information about the Comp.lang.c mailing list