[LLVMbugs] [Bug 6901] New: iostream compilation broken

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 23 04:21:57 PDT 2010


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

           Summary: iostream compilation broken
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: luc_j_bourhis at mac.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


I checked out llvm and clang trunk and compiled, following instructions on the
clang web page. Then (on MacOS 10.6.3),

~> cat iostream_trivia.cpp
#include <iostream>
int main() {
  std::cout << 0.12345678 << "\n";
}

~> clang iostream_trivia.cpp
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:78:
/usr/include/sys/_structs.h:191:40: error: elaborated type refers to a typedef
__darwin_fd_isset(int _n, const struct fd_set *_p)
                                       ^
/usr/include/sys/_structs.h:186:3: note: declared here
} fd_set;
  ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
/usr/include/sys/select.h:137:19: error: reference to 'fd_set' is ambiguous
int      pselect(int, fd_set * __restrict, fd_set * __restrict,
                      ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:78:
/usr/include/sys/_structs.h:186:3: note: candidate found by name lookup is
'fd_set'
} fd_set;
  ^
/usr/include/sys/_structs.h:184:16: note: candidate found by name lookup is
'fd_set'
typedef struct fd_set {
               ^
/usr/include/sys/_structs.h:191:40: note: candidate found by name lookup is
'fd_set'
__darwin_fd_isset(int _n, const struct fd_set *_p)
                                       ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
/usr/include/sys/select.h:137:40: error: reference to 'fd_set' is ambiguous
int      pselect(int, fd_set * __restrict, fd_set * __restrict,
                                           ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:78:
/usr/include/sys/_structs.h:186:3: note: candidate found by name lookup is
'fd_set'
} fd_set;
  ^
/usr/include/sys/_structs.h:184:16: note: candidate found by name lookup is
'fd_set'
typedef struct fd_set {
               ^
/usr/include/sys/_structs.h:191:40: note: candidate found by name lookup is
'fd_set'
__darwin_fd_isset(int _n, const struct fd_set *_p)
                                       ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
/usr/include/sys/select.h:138:3: error: reference to 'fd_set' is ambiguous
                fd_set * __restrict, const struct timespec * __restrict,
                ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:78:
/usr/include/sys/_structs.h:186:3: note: candidate found by name lookup is
'fd_set'
} fd_set;
  ^
/usr/include/sys/_structs.h:184:16: note: candidate found by name lookup is
'fd_set'
typedef struct fd_set {
               ^
/usr/include/sys/_structs.h:191:40: note: candidate found by name lookup is
'fd_set'
__darwin_fd_isset(int _n, const struct fd_set *_p)
                                       ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:152:
/usr/include/sys/_select.h:39:18: error: reference to 'fd_set' is ambiguous
int      select(int, fd_set * __restrict, fd_set * __restrict,
                     ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:78:
/usr/include/sys/_structs.h:186:3: note: candidate found by name lookup is
'fd_set'
} fd_set;
  ^
/usr/include/sys/_structs.h:184:16: note: candidate found by name lookup is
'fd_set'
typedef struct fd_set {
               ^
/usr/include/sys/_structs.h:191:40: note: candidate found by name lookup is
'fd_set'
__darwin_fd_isset(int _n, const struct fd_set *_p)
                                       ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:152:
/usr/include/sys/_select.h:39:39: error: reference to 'fd_set' is ambiguous
int      select(int, fd_set * __restrict, fd_set * __restrict,
                                          ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:78:
/usr/include/sys/_structs.h:186:3: note: candidate found by name lookup is
'fd_set'
} fd_set;
  ^
/usr/include/sys/_structs.h:184:16: note: candidate found by name lookup is
'fd_set'
typedef struct fd_set {
               ^
/usr/include/sys/_structs.h:191:40: note: candidate found by name lookup is
'fd_set'
__darwin_fd_isset(int _n, const struct fd_set *_p)
                                       ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:152:
/usr/include/sys/_select.h:40:3: error: reference to 'fd_set' is ambiguous
                fd_set * __restrict, struct timeval * __restrict)
                ^
In file included from iostream.cpp:1:
In file included from /usr/include/c++/4.2.1/iostream:43:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:
In file included from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:519:
In file included from /usr/include/sys/select.h:78:
/usr/include/sys/_structs.h:186:3: note: candidate found by name lookup is
'fd_set'
} fd_set;
  ^
/usr/include/sys/_structs.h:184:16: note: candidate found by name lookup is
'fd_set'
typedef struct fd_set {
               ^
/usr/include/sys/_structs.h:191:40: note: candidate found by name lookup is
'fd_set'
__darwin_fd_isset(int _n, const struct fd_set *_p)
                                       ^
7 errors generated.

~> uname -a
Darwin Zeus.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST
2010; root:xnu-1504.3.12~1/RELEASE_I386 i386

-- 
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