[LLVMbugs] [Bug 17890] New: __USER_LABEL_PREFIX__ incompatibility between clang and gcc on Debian GNU/kFreeBSD

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 11 20:23:47 PST 2013


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

            Bug ID: 17890
           Summary: __USER_LABEL_PREFIX__ incompatibility between clang
                    and gcc on Debian GNU/kFreeBSD
           Product: clang
           Version: 3.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: joel at lopes-da-silva.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

__USER_LABEL_PREFIX__ incompatibility between clang and gcc on Debian
GNU/kFreeBSD

Whenever I use sscanf on Debian GNU/kFreeBSD Wheezy 7.2, I get the following
error: undefined reference to `___isoc99_sscanf'

In case you're not familiar with this system, Debian GNU/kFreeBSD is a special
variant of the Debian distribution using the FreeBSD kernel with the GNU stack
from Debian GNU/Linux. I guess the relevant difference between Debian
GNU/kFreeBSD and the more common FreeBSD is that Debian GNU/kFreeBSD uses the
GNU version of the C library.


I believe this is essentially the same bug as another one you guys previously
fixed for Linux: http://llvm.org/bugs/show_bug.cgi?id=2824

I'm gathering some of the information you guys requested for that older bug
report:

$ gcc -E -o - -dM -x c - < /dev/null | grep USER_LABEL
#define __USER_LABEL_PREFIX__ 
$ clang -E -o - -dM -x c - < /dev/null | grep USER_LABEL
#define __USER_LABEL_PREFIX__ _


Here's some more information you may find relevant:

$ uname -a
GNU/kFreeBSD machine.domain.tld 9.0-2-amd64 #0 Tue Sep 10 18:35:20 CEST 2013
x86_64 amd64 Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz GNU/kFreeBSD

$ gcc --version 
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang --version
Debian clang version 3.0-6.2 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: x86_64-pc-kfreebsd-gnu
Thread model: posix


I verified that adding the following code at the very top of the compilation
unit where I used sscanf did fix the compilation error:

    #undef __USER_LABEL_PREFIX__
    #define __USER_LABEL_PREFIX__

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131112/7c13b980/attachment.html>


More information about the llvm-bugs mailing list