From: Eric Blake <eblake@redhat.com>
To: Bruno Haible <bruno@clisp.org>,
bug-gnulib@gnu.org, The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: stdnoreturn: fix for Cygwin
Date: Thu, 17 Aug 2017 01:55:00 -0000 [thread overview]
Message-ID: <6fe7ba4d-f88f-3ef0-92ff-15cd667f190d@redhat.com> (raw)
In-Reply-To: <4e8c3f47-fb4b-eb8d-12d9-6ad40e219279@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1627 bytes --]
On 08/16/2017 07:59 PM, Eric Blake wrote:
> Adding cygwin list...
>
> On 08/16/2017 07:01 PM, Bruno Haible wrote:
>> On Cygwin 1.7.30, I'm seeing this testdir build failure, when compiling
>> test-stdnoreturn.c:
>>
>> /usr/include/stdlib.h:66:28: error: expected ‘,’ or ‘;’ before ‘)’ token
>> _VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
>
>> +
>> + Similarly, on Cygwin, standard include files contain declarations like
>> + void __cdecl abort (void) __attribute__ ((noreturn));
>> + "#define noreturn _Noreturn" would cause this declaration to be rewritten
>> + to the invalid
>> + void __cdecl abort (void) __attribute__ ((__attribute__ ((__noreturn__))));
>
> Hmm. It's evil for any system .h file to ever use
> __attribute__((barename)), since barename is in the user's namespace and
> can therefore be defined to anything else, possibly breaking the header
> (as you just proved). Hopefully, the problem goes away if cygwin
> patches its headers to use __attribute__((__noreturn__)), so that gnulib
> can then define noreturn at will.
>
> I'll look into patching Cygwin to fix all barename attributes I can find
> that should be __barename__ instead.
On a closer look, I've already done this, several years ago (although a
few more have crept in since then):
https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=ada456dcf
Bruno, your cygwin installation of 1.7.30 is old, compared to current 2.8.2
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
prev parent reply other threads:[~2017-08-17 1:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4260817.MvLg4Vb6y4@omega>
2017-08-17 1:00 ` Eric Blake
2017-08-17 1:55 ` Eric Blake [this message]
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=6fe7ba4d-f88f-3ef0-92ff-15cd667f190d@redhat.com \
--to=eblake@redhat.com \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--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).