This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/760: 'dos' format files upset cpp when using '\' to continue macros
- To: gcc-gnats at gcc dot gnu dot org
- Subject: preprocessor/760: 'dos' format files upset cpp when using '\' to continue macros
- From: tony dot luck at intel dot com
- Date: 9 Nov 2000 20:09:06 -0000
- Reply-To: tony dot luck at intel dot com
>Number: 760
>Category: preprocessor
>Synopsis: 'dos' format files upset cpp when using '\' to continue macros
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Thu Nov 09 12:16:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Tony Luck
>Release: egcs-2.91.66 19990314/Linux
>Organization:
>Environment:
redhat linux
>Description:
I have an application that was developed on a windows system so all the files use \r\n to terminate lines. The compiler is mostly happy with this, except when a macro extends across multiple lines, then the compiler complains.
>How-To-Repeat:
here's a trivial test case ... just make sure that you end all lines with \r\n:
------------------------------------------
#define inc(x) \
((x) + 1)
main()
{
printf("%d\n", inc(1));
}
-------------------------------------------
compiler says:
-------------------------------------------
test.c:2: parse error before `+'
test.c:6: stray '\' in program
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: