[LLVMbugs] [Bug 2824] New: __USER_LABEL_PREFIX__ incompabitibility
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Sep 23 03:12:15 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2824
Summary: __USER_LABEL_PREFIX__ incompabitibility
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu
While compiling a program I got this linker error:
(.text+0x3244): undefined reference to `__USER_LABEL_PREFIX____isoc99_sscanf'
Indeed the object file contains this symbol:
$ llvm-nm client.o|grep sscanf
U __USER_LABEL_PREFIX____isoc99_sscanf
This is the definition of sscanf (wrong):
extern int sscanf (__const char *__restrict __s, __const char *__restrict
__format, ...) __asm__ ("__USER_LABEL_PREFIX__" "__isoc99_sscanf")
__attribute__ ((__nothrow__));
This is the definition of sscanf when using gcc (or llvm-gcc) -std=c99:
extern int sscanf (__const char *__restrict __s, __const char *__restrict
__format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__));
This is the definition of sscanf if I -U __GNUC__:
extern int sscanf (const char * __s,
const char * __format, ...) ;
Testcase:
$ cat x.c
__USER_LABEL_PREFIX__
$ gcc -E x.c
# 1 "x.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "x.c"
$ clang -E x.c
# 1 "x.c"
# 1 "x.c" 1
# 0 "x.c"
# 1 "<predefines>" 1
# 1 "x.c" 2
__USER_LABEL_PREFIX__
--
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