[LLVMbugs] [Bug 5986] New: Objective-C instance variable confused with builtin C function

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Jan 10 10:20:47 PST 2010


           Summary: Objective-C instance variable confused with builtin C
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: truls.becken at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Clang sometimes confuses instance variables with C functions it thinks should
exist. A common ivar name is index, which also happens to be the name of a
standard string function. On Linux, this could result in the error shown below.
This does supposedly not happen on FreeBSD because index is not treated as
builtin there.

Making all for framework EtoileXML...
 Compiling file ETXMLNode.m ...
clang: warning: argument unused during compilation: '-march=i686'
ETXMLNode.m:76:8: error: implicitly declaring C library function
'index' with type
     'char *(char const *, int)'
       while(index < count)
ETXMLNode.m:76:8: note: please include the header <strings.h> or
explicitly provide a declaration
     for 'index'

Best regards,

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