From: cyg Simple <cygsimple@gmail.com>
To: cygwin@cygwin.com
Subject: Re: sys/cdefs.h or maybe gcc build issue
Date: Wed, 02 Nov 2016 02:29:00 -0000 [thread overview]
Message-ID: <a4f02950-0178-4a83-482d-03452958e0a9@gmail.com> (raw)
In-Reply-To: <6ecdfff0-9f53-9cd6-9934-6237c153ea7b@cornell.edu>
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 <sys/cdefs.h>
>> #include <stdio.h>
>>
>> __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
next prev parent reply other threads:[~2016-11-02 2:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-30 18:37 cyg Simple
2016-10-30 21:33 ` Brian Inglis
2016-10-31 11:05 ` cyg Simple
2016-11-01 19:42 ` Ken Brown
2016-11-02 2:29 ` cyg Simple [this message]
2016-11-08 15:17 ` Corinna Vinschen
2016-11-09 2:09 ` cyg Simple
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4f02950-0178-4a83-482d-03452958e0a9@gmail.com \
--to=cygsimple@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).