Another option is to put the continuation marker at the start of the next line, and allow it to take effect across multiple preceding comment-only or whitespace-only lines. Eg:
OBJECTS = one.o
\\ two.o # This object is notable for some reason
\\ three.o
# the next two objects must not be reordered
\\ four_a.o
\\ four_b.o
# end of reordering constraint
\\ five.o
#\\ six.o # removed until bug 1234 is fixed
\\ seven.o
\\ eight.o
And another option (which I think BCPL has) is to pair continuation markers at the end and start of the spliced lines. Any white space and/or comments between the splice markers is deleted. You could also specify that bracketed comments such as /* */ have these semantics.
In fact, backslash-newline is redundant in C (if you don't use it to split tokens, which is evil) because its pertinent uses can be replaced by a /* \n */ comment or by a "..." \n "..." string continuation.
Indeed. I made that observation when I bumped into Simon in the pub this evening.
There is just one place I can think of where backslash-newline is nonetheless needed: splitting a #include filename across multiple lines. Why doesn't the preprocessor concatenate all strings that follow the #include directive to make the filename? I concluded some hysterical raisins might be involved. (ISTR encountering a compiler once upon a time that had a non-standard optional second parameter.)
I ought to have thought of that myself, since the disgusting mkfiles.pl script that I use to manage the many makefiles for my portable free software uses that technique. Ahem.
There is just one place I can think of where backslash-newline is nonetheless needed: splitting a #include filename across multiple lines. Why doesn't the preprocessor concatenate all strings that follow the #include directive to make the filename? I concluded some hysterical raisins might be involved. (ISTR encountering a compiler once upon a time that had a non-standard optional second parameter.)
Also, #include delenda est: http://www.infoq.com/news/2012/11/llvm-modules
mkfiles.pl
script that I use to manage the many makefiles for my portable free software uses that technique. Ahem.