https://llvm.org/bugs/show_bug.cgi?id=27592
Bug ID: 27592 Summary: __builtin_strcmp in -O0 generates call to non-#included strcmp Product: new-bugs Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: hmij...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified $ cat builtin.c #include <stdio.h> int main(void){ printf("%d", __builtin_strcmp("asfd", "asdf")); } $ clang-3.9 builtin.c -O0 $ objdump -T a.out a.out: file format elf64-x86-64 DYNAMIC SYMBOL TABLE: 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 printf 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 __libc_start_main 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strcmp 0000000000000000 w D *UND* 0000000000000000 __gmon_start__ When compiling with -O1, the strcmp call is no longer there. I am not sure how serious this is, but given that clang won't allow me to call strcmp() without #include <string.h>, it's kinda suspicious that it does so itself. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs