[LLVMbugs] [Bug 10207] New: [C] btowc() autoconf check hangs
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 27 14:13:42 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10207
Summary: [C] btowc() autoconf check hangs
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: pipping at exherbo.org
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6793)
--> (http://llvm.org/bugs/attachment.cgi?id=6793)
configure check
the btowc.m4 check generated from gnulib's gl_FUNC_BTOWC looks like this:
<<<SNIP
#include <string.h>
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#include <wchar.h>
int main ()
{
if (btowc ('\0') != 0)
return 1;
return 0;
}
<<<SNIP
If I compile this with gcc and run it, it returns as expected (even with -O3).
It compiles and returns when run as well for clang with -O0 and -O1.
It hangs for clang -O2 and -O3.
This on linux 2.6.39.2 with clang 3.0
git-6594942e98e25640f226aba622eb76bcaf0a521c.
--
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