[LLVMbugs] [Bug 11533] New: clang is wrongly proposing assuming that strlcpy or strlcat are part of the lib c

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Dec 10 10:12:47 PST 2011


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

             Bug #: 11533
           Summary: clang is wrongly proposing assuming that strlcpy or
                    strlcat are part of the lib c
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Headers
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sylvestre at debian.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Under Debian, the following code:
int
main ()
{
    (void) strlcat;
    return 0;
}
will trigger the warning:
test.c:4:12: warning: implicitly declaring C library function 'strlcat' with
      type 'unsigned long (char *, const char *, unsigned long)'
    (void) strlcat;
           ^
test.c:4:12: note: please include the header <string.h> or explicitly provide a
      declaration for 'strlcat'
1 warning generated.

while strlcat (or strlcpy) does not exist under Debian libc (version 2.13-21 on
my system).

This has been reported initially here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651454

-- 
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