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

           Summary: Improve diagnostic for funny input characters
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


(you will need to get the actual input, this won't cut and paste most likely):
--
ddun...@lordcrumb:tmp$ cat t.c
/* <- there is a funny character here */
/* and another one here -> *//* <- there */
ddun...@lordcrumb:tmp$ gcc t.c
t.c:2: error: stray ‘\357’ in program
t.c:2: error: stray ‘\273’ in program
t.c:2: error: stray ‘\277’ in program
ddun...@lordcrumb:tmp$ clang t.c
t.c:1:1: error: expected identifier or '('
/* <- there is a funny character here */
^
1 diagnostic generated.
--

Oddly enough, gcc ignores the first funny character and accepts it as valid
input, which is how this problem was discovered. Otherwise the character is
quite hard to see, so it would be nice if clang would go to some trouble to
point it out.


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to