From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62066 invoked by alias); 2 Nov 2016 02:29:46 -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 62039 invoked by uid 89); 2 Nov 2016 02:29:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=Ken, incorrectly, Hx-languages-length:1318, H*MI:sk:6ecdfff X-HELO: mail-it0-f44.google.com Received: from mail-it0-f44.google.com (HELO mail-it0-f44.google.com) (209.85.214.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Nov 2016 02:29:43 +0000 Received: by mail-it0-f44.google.com with SMTP id m138so62812599itm.1 for ; Tue, 01 Nov 2016 19:29:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=TlA1arJO3HAi+YA+kiLmIEx8cWXjn5DFwkXtFmWbvsw=; b=SySQ5pQtYYyvbAMM+xZ+VcCSqy1K+k8U9nG0uO/yH0y8IW2hF5ZEf5qdKDPjtRHPZl h+drQykMpjw0sMjA5k/EyN4PJNbIYRIAfZahrtG/7LCs8EcykxXB3SoLna9u4NOgf+7U N2Qlw3b96fV/poJxRGO97zhiP/iI/iUQ4fy5JSuM153Ueo2/DsTE7G0TzBW8IYQsctRE 4dqlAPEagVbkF40T5UU7ZruQRYAvuFuxyyuFHFPMdjci2wRmc+1+kb4Upk9gO/9rPwqJ X+egZA7gjo+Pik3ky2cWOIreEZ2fIvarFic/PqvQW/jLXgXHJuEC1kTCBdoRklMTcsXX 7OZQ== X-Gm-Message-State: ABUngveJWZ6ciPs+vx9nuuD4D3xe/cZThVs+JlRMrDl5F+l24hkw59wR1CeRJ77t348a0g== X-Received: by 10.107.15.153 with SMTP id 25mr1757281iop.168.1478053780997; Tue, 01 Nov 2016 19:29:40 -0700 (PDT) Received: from [192.168.0.6] (d27-96-48-76.nap.wideopenwest.com. [96.27.76.48]) by smtp.gmail.com with ESMTPSA id n62sm153165ith.2.2016.11.01.19.29.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Nov 2016 19:29:40 -0700 (PDT) Subject: Re: sys/cdefs.h or maybe gcc build issue To: cygwin@cygwin.com References: <57cbf5e2-f37b-ae50-f65c-dd6782481962@gmail.com> <6ecdfff0-9f53-9cd6-9934-6237c153ea7b@cornell.edu> From: cyg Simple Message-ID: Date: Wed, 02 Nov 2016 02:29:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <6ecdfff0-9f53-9cd6-9934-6237c153ea7b@cornell.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00005.txt.bz2 On 11/1/2016 3:42 PM, Ken Brown wrote: > On 10/30/2016 2:23 PM, cyg Simple wrote: >> The below sample code will give a warning that visibility isn't >> supported in this configuration. Either the GCC build is incorrect or >> the sys/cdefs.h needs to be modified to define __hidden to empty. >> >> /********************************************/ >> #include >> #include >> >> __hidden void hello (char * str) { >> printf("%s %s\n", "Hello", str); >> } >> >> int main (int argc, char ** argv) { >> hello("cruel world!"); >> } >> /********************************************/ > > If you're trying to write portable code, why would you assume that > __hidden is defined? It's not defined in glibc, for example, and your > sample program doesn't compile on Linux: > > $ gcc test.c > test.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before > ‘void’ > > Do you have a real use case where this issue came up? The sample isn't > very convincing as it stands. I don't in the real case sense but in Cygwin __hidden is defined. And obviously it is incorrectly defined in _YOUR_ Linux. If the visibility attribute isn't supported by the GCC compiler these helper macros shouldn't be defined as if they were. -- cyg Simple -- 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