[LLVMbugs] [Bug 11452] New: Line splicing in MSVC compatibility mode

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 28 23:13:26 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11452

             Bug #: 11452
           Summary: Line splicing in MSVC compatibility mode
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: eremeev at viva64.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Source lines followed by a backslash (\) and a newline immediately after it are
spliced by clang. In case of the following:

int Test(int a, int b) \
{int c = a + b; \
    return c;\
}

It will be preprocessed by clang as:

int Test(int a, int b) {int c = a + b; return c;}

MSVC preprocessor behaves differently and will splice the lines only inside a
macro definition. The code example above will not be joined into a single line
by MSVC preprocessor.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list