From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFA 2/3] Add missing ATTRIBUTE_NORETURNs
Date: Tue, 27 Sep 2016 18:16:00 -0000 [thread overview]
Message-ID: <1475000192-8789-3-git-send-email-tom@tromey.com> (raw)
In-Reply-To: <1475000192-8789-1-git-send-email-tom@tromey.com>
This patch adds a couple of missing ATTRIBUTE_NORETURNs. This lets
-Wimplicit-fallthrough recognize that a given case does not fall
through.
2016-09-27 Tom Tromey <tom@tromey.com>
* dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
* completer.h (throw_max_completions_reached_error): Add
ATTRIBUTE_NORETURN.
---
gdb/ChangeLog | 6 ++++++
gdb/completer.h | 3 ++-
gdb/dwarf2loc.c | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fdd43ab..83b051f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2016-09-27 Tom Tromey <tom@tromey.com>
+ * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
+ * completer.h (throw_max_completions_reached_error): Add
+ ATTRIBUTE_NORETURN.
+
+2016-09-27 Tom Tromey <tom@tromey.com>
+
* xcoffread.c (scan_xcoff_symtab): Move comment later.
* symfile.c (section_is_mapped): Fix fall-through comment.
* stabsread.c (define_symbol, read_member_functions): Fix
diff --git a/gdb/completer.h b/gdb/completer.h
index 24bfee9..ff01f86 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -179,6 +179,7 @@ extern enum maybe_add_completion_enum
/* Wrapper to throw MAX_COMPLETIONS_REACHED_ERROR. */
-extern void throw_max_completions_reached_error (void);
+extern void throw_max_completions_reached_error (void)
+ ATTRIBUTE_NORETURN;
#endif /* defined (COMPLETER_H) */
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index f9f3216..a29c9ed 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -2917,7 +2917,7 @@ dwarf2_loc_desc_get_symbol_read_needs (const gdb_byte *data, size_t size,
/* A helper function that throws an unimplemented error mentioning a
given DWARF operator. */
-static void
+static void ATTRIBUTE_NORETURN
unimplemented (unsigned int op)
{
const char *name = get_DW_OP_name (op);
--
2.7.4
next prev parent reply other threads:[~2016-09-27 18:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 18:16 [RFA 0/3] Fix some -Wimplicit-fallthrough warnings Tom Tromey
2016-09-27 18:16 ` Tom Tromey [this message]
2016-09-28 7:28 ` [RFA 2/3] Add missing ATTRIBUTE_NORETURNs Yao Qi
2016-09-28 17:40 ` Tom Tromey
2016-09-28 17:41 ` Yao Qi
2016-09-27 18:16 ` [RFA 1/3] Fix "fall through" comments Tom Tromey
2016-09-27 21:48 ` Yao Qi
2016-09-27 21:53 ` Tom Tromey
2016-09-28 21:51 ` Yao Qi
2016-09-28 21:58 ` Tom Tromey
2016-09-30 21:09 ` Yao Qi
2016-09-27 18:52 ` [RFA 3/3] Fix "obvious" fall-through warnings Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475000192-8789-3-git-send-email-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox