using __dead instead of __attribute__((__noreturn__)) actually
hinders portability rather than helping it.
Given that mandoc already uses __attribute__ in several files
and that in the portable version, ./configure already contains
rudimentary support for ignoring it on platforms that do not
support it, use __attribute__ directly.
This is expected to fix build failures that Stephen Gregoratto
<dev at sgregoratto dot me> reported from Arch and Debian Linux.
-/* $Id: man_validate.c,v 1.147 2019/03/11 13:21:11 schwarze Exp $ */
+/* $Id: man_validate.c,v 1.148 2019/03/13 18:29:18 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>
typedef void (*v_check)(CHKARGS);
typedef void (*v_check)(CHKARGS);
-static __dead void check_abort(CHKARGS);
+static void check_abort(CHKARGS) __attribute__((__noreturn__));
static void check_par(CHKARGS);
static void check_part(CHKARGS);
static void check_root(CHKARGS);
static void check_par(CHKARGS);
static void check_part(CHKARGS);
static void check_root(CHKARGS);
"(OpenBSD)" : "(NetBSD)");
}
"(OpenBSD)" : "(NetBSD)");
}
check_abort(CHKARGS)
{
abort();
check_abort(CHKARGS)
{
abort();
-/* $Id: mdoc_validate.c,v 1.372 2019/03/11 13:21:11 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.373 2019/03/13 18:29:18 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2019 Ingo Schwarze <schwarze@openbsd.org>
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2019 Ingo Schwarze <schwarze@openbsd.org>
static void rewrite_macro2len(struct roff_man *, char **);
static int similar(const char *, const char *);
static void rewrite_macro2len(struct roff_man *, char **);
static int similar(const char *, const char *);
-static __dead void post_abort(POST_ARGS);
+static void post_abort(POST_ARGS) __attribute__((__noreturn__));
static void post_an(POST_ARGS);
static void post_an_norm(POST_ARGS);
static void post_at(POST_ARGS);
static void post_an(POST_ARGS);
static void post_an_norm(POST_ARGS);
static void post_at(POST_ARGS);
post_abort(POST_ARGS)
{
abort();
post_abort(POST_ARGS)
{
abort();