[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


           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:

#include <string.h>
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
   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;

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 with clang 3.0

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