[llvm-bugs] [Bug 40689] New: Whitespace added during assembly
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Feb 11 03:58:56 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40689
Bug ID: 40689
Summary: Whitespace added during assembly
Product: clang
Version: unspecified
Hardware: All
OS: MacOS X
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: adam at ahri.net
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Whitespace added during assembly breaks some files:
$ cat > bug
#!/bin/sh
#ifdef mingw32_HOST_OS
echo windows
#else
echo not windows
#endif
When assembled:
$ clang -E -x assembler-with-cpp bug
# 1 "bug"
# 1 "<built-in>" 1
# 1 "bug" 2
#!/bin/sh
echo not windows
Note the space added before the shebang.
More specifically, this breaks Haskell scripts that use clang to assemble files
which in turn employ the CPP extension; the leading space confuses the Haskell
compiler, stopping it from ignoring the shebang line and failing with a Haskell
compilation error.
--
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/20190211/19c86994/attachment.html>
More information about the llvm-bugs
mailing list