[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] stdnoreturn: new module
From: |
Bruno Haible |
Subject: |
Re: [PATCH] stdnoreturn: new module |
Date: |
Wed, 29 Feb 2012 01:03:48 +0100 |
User-agent: |
KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; ) |
Paul Eggert wrote:
> I thought about it some more, and came up with
> one somewhat-extreme way to try to fix things.
> <stdnoreturn.h> could do this:
>
> #if 1200 <= _MSC_VER
> # define noreturn
> #else
> # define noreturn _Noreturn
> #endif
>
> As I understand it, this would cause MSVC's stdlib.h to
> expand to this:
>
> __declspec( ) void abort (void);
>
> which (if Microsoft's grammar is right) should compile.
Yes, the Microsoft compiler groks a __declspec(), like it was absent.
The other, equally extreme, solution is to add
#ifdef _MSC_VER
# include <stdlib.h>
# include <setjmp.h>
# include <process.h>
#endif
to the top of gnulib/lib/stdnoreturn.in.h.
Bruno
- [PATCH] stdnoreturn: new module, Paul Eggert, 2012/02/24
- Re: [PATCH] stdnoreturn: new module, Bruno Haible, 2012/02/27
- Re: [PATCH] stdnoreturn: new module, Bruno Haible, 2012/02/28
- Re: [PATCH] stdnoreturn: new module, Paul Eggert, 2012/02/28
- Re: [PATCH] stdnoreturn: new module, Eric Blake, 2012/02/28
- Re: [PATCH] stdnoreturn: new module, Bruno Haible, 2012/02/28
- Re: [PATCH] stdnoreturn: new module, Paul Eggert, 2012/02/29