public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: bug-gnulib@gnu.org, The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: [PATCH] openat-die: use _Noreturn markup
Date: Thu, 31 Jul 2014 04:22:00 -0000	[thread overview]
Message-ID: <53D9C46E.8060109@redhat.com> (raw)
In-Reply-To: <53D9BDAD.3000504@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

On 07/30/2014 09:53 PM, Eric Blake wrote:

> 
> Meanwhile, './gnulib-tool --test stdnoreturn' is failing on cygwin, so
> I'm trying to track down why.
> 
> In file included from /usr/include/stdlib.h:11:0,
>                  from ../../gltests/test-stdnoreturn.c:23:
> ./../config.h:33:21: error: expected '(' before '__attribute__'
>  #  define _Noreturn __attribute__ ((__noreturn__))
>                      ^
> 

Oh, I think I see the problem.  Pasting more of the error message:

/usr/include/stdlib.h:66:28: error: expected ',' or ';' before ')' token
 _VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
                            ^

Looks like the cygwin headers are broken for misusing 'noreturn' instead
of __noreturn__ inside __attribute__; something that is easier to patch
in cygwin than work around in gnulib.

For more proof:

$ printf '#include <stdnoreturn.h>\n#include <stdlib.h>\n' \
  | gcc -xc -E - | grep abort
void __attribute__((__cdecl__)) abort (void) __attribute__ ((_Noreturn));
$ printf '#include <stdnoreturn.h>\n#include <stdlib.h>\n' \
  | gcc -xc -E - -D_Noreturn='__attribute__((__noreturn__))' \
  | grep abort
void __attribute__((__cdecl__)) abort (void) __attribute__
((__attribute__((__noreturn__))));



-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

       reply	other threads:[~2014-07-31  4:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1406755527-26369-1-git-send-email-eblake@redhat.com>
     [not found] ` <53D9BDAD.3000504@redhat.com>
2014-07-31  4:22   ` Eric Blake [this message]
2014-07-31  4:31     ` Jim Meyering
2014-07-31 14:07       ` Paul Eggert

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=53D9C46E.8060109@redhat.com \
    --to=eblake@redhat.com \
    --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).