X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fstdnoreturn.in.h;h=ab9202ed1375eab9ce9cd6ccfad7a2434f5e7537;hb=afecf4a0bde14016fb4ab2a18395d82cfbc0fe28;hp=5ca30631fedbb599c6f50e19e82cfda0aa3e826a;hpb=9a9dd2c085a29b7837437dd8fbf3ccc96d4e71df;p=gnulib.git diff --git a/lib/stdnoreturn.in.h b/lib/stdnoreturn.in.h index 5ca30631f..ab9202ed1 100644 --- a/lib/stdnoreturn.in.h +++ b/lib/stdnoreturn.in.h @@ -28,7 +28,19 @@ /* The definition of _Noreturn is copied here. */ -#define noreturn _Noreturn +#if 1200 <= _MSC_VER +/* Standard include files on this platform contain declarations like + "__declspec (noreturn) void abort (void);". "#define noreturn + _Noreturn" would cause this declaration to be rewritten to the + invalid "__declspec (__declspec (noreturn)) void abort (void);". + Instead, define noreturn to empty, so that such declarations are + rewritten to "__declspec () void abort (void);", which is + equivalent to "void abort (void);"; this gives up on noreturn's + advice to the compiler but at least it is valid code. */ +# define noreturn /*empty*/ +#else +# define noreturn _Noreturn +#endif /* Did he ever return? No he never returned