[LLVMbugs] [Bug 5607] New: Improve diagnostic for funny input characters

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Nov 24 15:08:02 PST 2009


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: unassignedclangbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu


(you will need to get the actual input, this won't cut and paste most likely):
--
ddunbar at lordcrumb:tmp$ cat t.c
/* <- there is a funny character here */
/* and another one here -> *//* <- there */
ddunbar at 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
ddunbar at 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.



More information about the llvm-bugs mailing list