]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Reduce explicit use of __attribute__.
authorBruno Haible <bruno@clisp.org>
Sat, 9 May 2020 00:12:02 +0000 (02:12 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 9 May 2020 00:46:31 +0000 (02:46 +0200)
* gnulib-local/lib/xalloc.h: Include noreturn.h.
(xalloc_die): Use _GL_NORETURN_FUNC.
* gnulib-local/modules/xalloc (Depends-on): Add noreturn.

.gitignore
gnulib-local/lib/xalloc.h
gnulib-local/modules/xalloc
libtextstyle/.gitignore

index 01dbbb8bb44a33c02b84b9c056e4b07340c6f216..102c17d22d88a6a679daf3faec2ab2ce8a9add7e 100644 (file)
 /gettext-tools/libgettextpo/msvc-inval.h
 /gettext-tools/libgettextpo/msvc-nothrow.c
 /gettext-tools/libgettextpo/msvc-nothrow.h
+/gettext-tools/libgettextpo/noreturn.h
 /gettext-tools/libgettextpo/obstack.c
 /gettext-tools/libgettextpo/obstack.h
 /gettext-tools/libgettextpo/open.c
index b512cc8eb7368025a8f7ed261ecfcc0552b200b5..460d06c69fb0b281fb8831cf38fae892116a4488 100644 (file)
@@ -1,5 +1,5 @@
 /* malloc with out of memory checking.
-   Copyright (C) 2001-2004, 2006, 2019 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006, 2019-2020 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -20,6 +20,7 @@
 
 #include <stddef.h>
 
+#include "noreturn.h"
 #include "xalloc-oversized.h"
 
 
@@ -78,11 +79,7 @@ extern "C" {
    in charge of honoring the three previous items.  This is the
    function to call when one wants the program to die because of a
    memory allocation failure.  */
-extern void xalloc_die (void)
-#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) && !__STRICT_ANSI__
-     __attribute__ ((__noreturn__))
-#endif
-     ;
+_GL_NORETURN_FUNC extern void xalloc_die (void);
 
 /* In the following macros, T must be an elementary or structure/union or
    typedef'ed type, or a pointer to such a type.  To apply one of the
index dd8151511fd4f1cac47b2443563d4db9494b239b..deec4d45174c73e1bc021ab8dcd9bc5238a62a1a 100644 (file)
@@ -9,6 +9,7 @@ lib/xstrdup.c
 Depends-on:
 error
 gettext-h
+noreturn
 stdlib
 xalloc-oversized
 
index bbf13128690c3377ee7bf1f66513f692a8119130..36a5aebdbbed3a776597dc452a64748616d63a1b 100644 (file)
 /lib/msvc-nothrow.h
 /lib/noop-styled-ostream.oo.c
 /lib/noop-styled-ostream.oo.h
+/lib/noreturn.h
 /lib/obstack.c
 /lib/obstack.h
 /lib/ostream.oo.c