From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m0.truegem.net (m0.truegem.net [69.55.228.47]) by sourceware.org (Postfix) with ESMTPS id 14F8A3858D32 for ; Tue, 4 Jul 2023 18:51:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 14F8A3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maxrnd.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=maxrnd.com Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id 364Iqdgr017301 for ; Tue, 4 Jul 2023 11:52:39 -0700 (PDT) (envelope-from mark@maxrnd.com) Received: from 50-1-247-226.fiber.dynamic.sonic.net(50.1.247.226), claiming to be "[192.168.4.100]" via SMTP by m0.truegem.net, id smtpdLMh758; Tue Jul 4 11:52:32 2023 Subject: Re: iostream doesn't work (clang++) To: cygwin@cygwin.com References: <7e07e251-2ec6-b7a5-62da-8578eb638993@gmail.com> From: Mark Geisert Message-ID: <4a37e6f9-bcc2-f222-8598-43ba0a4ed54c@maxrnd.com> Date: Tue, 4 Jul 2023 11:51:16 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 In-Reply-To: <7e07e251-2ec6-b7a5-62da-8578eb638993@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi there, ggl329 via Cygwin wrote: > Hi, > > clang++ fails with iostream. > Does it go well in your environment? > # I noticed that clang is orphaned. clang requires a maintainer? > > > $ cat sample.cc > #include > int main() > { >     std::cout << "Hello World.\n"; >     return 0; > } > > $ g++ sample.cc > $ ./a > Hello World. > > $ clang++ sample.cc > In file included from sample.cc:1: > In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iostream:39: > In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ostream:38: > In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ios:42: > In file included from > /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ios_base.h:39: > In file included from > /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ext/atomicity.h:35: > In file included from > /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr.h:148: > In file included from > /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr-default.h:35: > In file included from /usr/include/pthread.h:11: > In file included from /usr/include/sys/types.h:221: > In file included from /usr/include/sys/_pthreadtypes.h:12: > /usr/include/sys/cpuset.h:45:24: error: use of undeclared identifier > '__builtin_malloc'; did you mean >       '__builtin_alloca'? >   return (cpu_set_t *) __builtin_malloc (CPU_ALLOC_SIZE(num)); >                        ^ > /usr/include/sys/cpuset.h:45:24: note: '__builtin_alloca' declared here > /usr/include/sys/cpuset.h:52:3: error: use of undeclared identifier '__builtin_free' >   __builtin_free (set); >   ^ > 2 errors generated. [...] That's not a problem with , but with . It did not anticipate being compiled with clang. I will submit a patch. Thanks for the report, ..mark