* Re: [PATCH] openat-die: use _Noreturn markup
[not found] ` <53D9BDAD.3000504@redhat.com>
@ 2014-07-31 4:22 ` Eric Blake
2014-07-31 4:31 ` Jim Meyering
0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2014-07-31 4:22 UTC (permalink / raw)
To: bug-gnulib, The Cygwin Mailing List
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] openat-die: use _Noreturn markup
2014-07-31 4:22 ` [PATCH] openat-die: use _Noreturn markup Eric Blake
@ 2014-07-31 4:31 ` Jim Meyering
2014-07-31 14:07 ` Paul Eggert
0 siblings, 1 reply; 3+ messages in thread
From: Jim Meyering @ 2014-07-31 4:31 UTC (permalink / raw)
To: Eric Blake; +Cc: bug-gnulib@gnu.org List, The Cygwin Mailing List
Glad you found the root of the problem, and that it's not in gnulib.
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] openat-die: use _Noreturn markup
2014-07-31 4:31 ` Jim Meyering
@ 2014-07-31 14:07 ` Paul Eggert
0 siblings, 0 replies; 3+ messages in thread
From: Paul Eggert @ 2014-07-31 14:07 UTC (permalink / raw)
To: Jim Meyering, Eric Blake; +Cc: The Cygwin Mailing List, bug-gnulib@gnu.org List
Jim Meyering wrote:
> Glad you found the root of the problem, and that it's not in gnulib.
Likewise. For future reference, we avoid <stdnoreturn.h> in gnulib
because MSVC mishandles it. Please see
doc/posix-headers/stdnoreturn.texi for details.
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-31 14:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1406755527-26369-1-git-send-email-eblake@redhat.com>
[not found] ` <53D9BDAD.3000504@redhat.com>
2014-07-31 4:22 ` [PATCH] openat-die: use _Noreturn markup Eric Blake
2014-07-31 4:31 ` Jim Meyering
2014-07-31 14:07 ` Paul Eggert
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).