public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
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:00:00 -0000	[thread overview]
Message-ID: <4e8c3f47-fb4b-eb8d-12d9-6ad40e219279@redhat.com> (raw)
In-Reply-To: <4260817.MvLg4Vb6y4@omega>


[-- Attachment #1.1: Type: text/plain, Size: 1275 bytes --]

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.

-- 
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 --]

       reply	other threads:[~2017-08-17  1:00 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 [this message]
2017-08-17  1:55   ` Eric Blake

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=4e8c3f47-fb4b-eb8d-12d9-6ad40e219279@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).