[LLVMbugs] [Bug 15664] New: -frewrite-includes doesn't handle Windows UTF-8 BOM
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 3 17:05:18 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15664
Bug ID: 15664
Summary: -frewrite-includes doesn't handle Windows UTF-8 BOM
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: paul_robinson at playstation.sony.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
when Clang crashes, it will create a preprocessed file using
-frewrite-includes.
Unfortunately this does not strip byte-order marks from included headers.
(http://en.wikipedia.org/wiki/Byte_order_mark)
Attached bom.c is a regular text file, bom.h is encoded as UTF-8 with BOM.
C:\Data\scratch>clang -c bom.c
C:\Data\scratch>clang -E bom.c > bom-E.c
C:\Data\scratch>clang -c bom-E.c
C:\Data\scratch>clang -E -frewrite-includes bom.c > bom-E2.c
C:\Data\scratch>clang -c bom-E2.c
./bom.h:1:1: error: non-ASCII characters are not allowed outside of literals
and
identifiers
<U+FEFF>void foo();
^~~~~~~~
1 error generated.
C:\Data\scratch>clang --version
clang version 3.3 (178499)
Target: i686-pc-win32
Thread model: posix
--
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/20130404/5239d735/attachment.html>
More information about the llvm-bugs
mailing list