From d182e39881061b11d1eb85426d9a6953e3171bf5 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 15 Oct 2023 11:09:07 -0600 Subject: Use C++17 [[fallthrough]] attribute This changes gdb to use the C++17 [[fallthrough]] attribute rather than special comments. This was mostly done by script, but I neglected a few spellings and so also fixed it up by hand. I suspect this fixes the bug mentioned below, by switching to a standard approach that, presumably, clang supports. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23159 Approved-By: John Baldwin Approved-By: Luis Machado Approved-By: Pedro Alves --- gdb/cli/cli-setshow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/cli') diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index c7bbac1..11f9306 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -379,7 +379,7 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) case var_filename: if (*arg == '\0') error_no_arg (_("filename to set it to.")); - /* FALLTHROUGH */ + [[fallthrough]]; case var_optional_filename: { char *val = NULL; -- cgit v1.1