This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cpp: handling of DOS newlines after line continuation backslashes?


How is cpp supposed to handle DOS newlines after line continuation
backslashes on a *nix platform? 

#define a(b) (b*\^M
b)
main() {printf("%d\n", a(5));}

$ gcc foo.c
foo.c:2: parse error before `)'
foo.c:3: stray '\' in program

^M denotes the char with ASCII code 13.  Without this char it works
like it should.

$ gcc -E foo.c
# 1 "foo.c"

b)
main() {printf("%d\n", ( 5 *\ );}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]