<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - __USER_LABEL_PREFIX__ incompatibility between clang and gcc on Debian GNU/kFreeBSD"
href="http://llvm.org/bugs/show_bug.cgi?id=17890">17890</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>__USER_LABEL_PREFIX__ incompatibility between clang and gcc on Debian GNU/kFreeBSD
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>joel@lopes-da-silva.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>__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: <a class="bz_bug_link
bz_status_CLOSED bz_closed"
title="CLOSED FIXED - __USER_LABEL_PREFIX__ incompabitibility"
href="show_bug.cgi?id=2824">http://llvm.org/bugs/show_bug.cgi?id=2824</a>
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__</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>