From 6ac852d15367db402f94828810c9483f76492ac5 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 29 Aug 2016 17:23:14 +0000 Subject: [PATCH] selftest.h: mark failure functions with ATTRIBUTE_NORETURN. gcc/ChangeLog: * selftest.h (selftest::fail): Add ATTRIBUTE_NORETURN. (selftest::fail_formatted): Likewise. From-SVN: r239832 --- gcc/ChangeLog | 5 +++++ gcc/selftest.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc2ccfc25c9..0e5b3afd5e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-08-29 David Malcolm + + * selftest.h (selftest::fail): Add ATTRIBUTE_NORETURN. + (selftest::fail_formatted): Likewise. + 2016-08-29 David Malcolm * input.c (make_location): Call get_start and get_finish diff --git a/gcc/selftest.h b/gcc/selftest.h index b073ed6e03d..e2d73565628 100644 --- a/gcc/selftest.h +++ b/gcc/selftest.h @@ -56,12 +56,13 @@ extern void pass (const location &loc, const char *msg); /* Report the failed outcome of some aspect of the test and abort. */ -extern void fail (const location &loc, const char *msg); +extern void fail (const location &loc, const char *msg) + ATTRIBUTE_NORETURN; /* As "fail", but using printf-style formatted output. */ extern void fail_formatted (const location &loc, const char *fmt, ...) - ATTRIBUTE_PRINTF_2; + ATTRIBUTE_PRINTF_2 ATTRIBUTE_NORETURN; /* Implementation detail of ASSERT_STREQ. */ -- 2.30.2