[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-bugs
Subject:    [LLVMbugs] [Bug 2824] New: __USER_LABEL_PREFIX__ incompabitibility
From:       bugzilla-daemon () cs ! uiuc ! edu
Date:       2008-09-23 10:12:15
Message-ID: bug-2824-206 () http ! llvm ! org/bugs/
[Download RAW message or body]

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@nondot.org
        ReportedBy: edwintorok@gmail.com
                CC: llvmbugs@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.
_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic