From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39509 invoked by alias); 12 Jul 2017 16:16:05 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 37357 invoked by uid 89); 12 Jul 2017 16:16:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*r:qmail-ldap-1.03, H*r:envelope-sender X-HELO: smtpout.aon.at Received: from smtpout.aon.at (HELO smtpout.aon.at) (195.3.96.77) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Jul 2017 16:16:00 +0000 Received: (qmail 2236 invoked from network); 12 Jul 2017 16:15:57 -0000 Received: from webmail-out.a1.net (HELO a1.net) ([213.33.87.6]) (envelope-sender ) by smarthub80.res.a1.net (qmail-ldap-1.03) with SMTP for ; 12 Jul 2017 16:15:57 -0000 X-A1Mail-Track-Id: 1499876157:2220:smarthub80:213.33.87.6:1 Date: Wed, 12 Jul 2017 16:16:00 -0000 From: bz0815@tirol.com To: cygwin@cygwin.com X-Auth-ID: aon.965001387.neff Subject: =?utf-8?Q?Pthreads=3A_Prototypes_missing_if_-std=3Dc11_?= Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: quoted-printable X-SW-Source: 2017-07/txt/msg00210.txt.bz2 Hello, gcc does not recognize some functions from pthread.h if option -std=3Dc11 i= s used: #include #define THREADS 5 int main (int argc, char *argv[]) { pthread_barrier_t barrier; pthread_barrier_init(&barrier, NULL, THREADS); } gcc -std=3Dc11 -o test test.c test.c: In function =E2=80=98main=E2=80=99: test.c:8:3: warning: implicit declaration of function =E2=80=98pthread_barr= ier_init=E2=80=99 [-Wimplicit-function-declaration] pthread_barrier_init(&barrier, NULL, THREADS); ^ There is no warning without that option: gcc -o test test.c My system is: $ uname -a CYGWIN_NT-10.0 DESKTOP 2.8.1(0.312/5/3) 2017-07-03 14:11 x86_64 Cygwin The compiler used is: $ gcc --version gcc (GCC) 5.4.0 Copyright (C) 2015 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. It seems to be a __POSIX_VISIBLE issue. Thanks -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple