[LLVMbugs] [Bug 16209] New: clang strips backslashes in @arg files

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 3 09:09:20 PDT 2013


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

            Bug ID: 16209
           Summary: clang strips backslashes in @arg files
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hans at chromium.org
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 13707
    Classification: Unclassified

This causes problems on Windows, where backslashes are common in argument files
because of the file system.

Clang is consistent with GCC here, but if we grow some kind of MSVC-compatible
driver mode, we should not strip the backslashes.

a.c:
foo

a.c.args:
-Dfoo=a\b\c

$ clang -E a.c @a.c.args
# 1 "a.c"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 159 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "a.c" 2
'abc'

$ gcc -E a.c @a.c.args
# 1 "a.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "a.c"
'abc'

cl.exe /E a.c @a.c.arg
#line 1 "a.c"
a\b\c

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130603/85ec77e1/attachment.html>


More information about the llvm-bugs mailing list