bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

obstack fix


From: Bruno Haible
Subject: obstack fix
Date: Fri, 11 Nov 2011 21:54:34 +0100
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

While testing a 'grep' prerelease on MSVC 9, I got this error:

obstack.c
obstack.c(406) : error C2381: 'print_and_abort': redefinition; 
__declspec(noreturn) differs from
        obstack.c(90): see declaration of 'print_and_abort'
make[4]: *** [obstack.obj] Error 2

This fixes it.


2011-11-11  Bruno Haible  <address@hidden>

        obstack: Fix compilation error on MSVC 9.
        * lib/obstack.c (print_and_abort): Declare with _Noreturn specifier.

--- lib/obstack.c.orig  Fri Nov 11 21:51:54 2011
+++ lib/obstack.c       Fri Nov 11 21:45:58 2011
@@ -87,7 +87,7 @@
    abort gracefully or use longjump - but shouldn't return.  This
    variable by default points to the internal function
    `print_and_abort'.  */
-static void print_and_abort (void);
+static _Noreturn void print_and_abort (void);
 void (*obstack_alloc_failed_handler) (void) = print_and_abort;
 
 /* Exit value used when `print_and_abort' is used.  */

-- 
In memoriam Jan Opletal <http://en.wikipedia.org/wiki/Jan_Opletal>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]