Red Hat Bugzilla – Bug 18818
Continuation character fails in compile stage
Last modified: 2005-10-31 17:00:50 EST
I try to compile the following, I get a parse erorr:
/* the continuation character causes an error. If the chaharacter is
removed and the following two line are joined, there is no problem */
#define PRINT (x) \
Note I have created a similar file in vi so there is no CR/LF issues and
the problem still occurs. I have a lot of source code that relies on the
continuation character support. Please confirm this a soon as possible.
Well, the code you provided above should give a parse error, because you have
space between PRINTF and (, which causes that PRINTF is not a function like
macro and the body of main expands to (x) printf(x);("\nHello\n");
If you indeed have no space between PRINTF and ( and the above is just a typo,
then make sure there are no spaces/tabs after the \ at the end of line.
It turns out I was a little premature in my bug report. The file I was working
with was transferred to my pc form a NT box. When I ran vi the extra characters
did not show up. It did however when I ran vi in binary mode.
Sorry for the inconveience.