aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-08-29 17:23:14 +0000
committerDavid Malcolm <dmalcolm@redhat.com>2016-08-29 17:23:14 +0000
commit31da63a35cfeb41d8d285031e074720bab4b9909 (patch)
tree2a8b9acf67fd59bb358b56188d80bef98ccc21fb
parent911d6ab2410788bed58bb928d8f2340e32df1709 (diff)
selftest.h: mark failure functions with ATTRIBUTE_NORETURN.
gcc/ChangeLog: * selftest.h (selftest::fail): Add ATTRIBUTE_NORETURN. (selftest::fail_formatted): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@239832 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/selftest.h5
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,5 +1,10 @@
2016-08-29 David Malcolm <dmalcolm@redhat.com>
+ * selftest.h (selftest::fail): Add ATTRIBUTE_NORETURN.
+ (selftest::fail_formatted): Likewise.
+
+2016-08-29 David Malcolm <dmalcolm@redhat.com>
+
* input.c (make_location): Call get_start and get_finish
on the endpoints to avoid storing packed ranges or ad-hoc
ranges in them.
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. */