mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
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 <jhb@FreeBSD.org> Approved-By: Luis Machado <luis.machado@arm.com> Approved-By: Pedro Alves <pedro@palves.net>
This commit is contained in:
@@ -8123,7 +8123,7 @@ Packet: '%s'\n"),
|
||||
if (event->ws.kind () != TARGET_WAITKIND_IGNORE)
|
||||
break;
|
||||
|
||||
/* fall through */
|
||||
[[fallthrough]];
|
||||
case 'S': /* Old style status, just signal only. */
|
||||
{
|
||||
int sig;
|
||||
@@ -8647,7 +8647,7 @@ remote_target::wait_as (ptid_t ptid, target_waitstatus *status,
|
||||
putpkt (buf);
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
default:
|
||||
warning (_("Invalid remote reply: %s"), buf);
|
||||
break;
|
||||
@@ -10002,7 +10002,7 @@ remote_target::putpkt_binary (const char *buf, int cnt)
|
||||
return 1;
|
||||
case '-':
|
||||
remote_debug_printf_nofunc ("Received Nak");
|
||||
/* FALLTHROUGH */
|
||||
[[fallthrough]];
|
||||
case SERIAL_TIMEOUT:
|
||||
tcount++;
|
||||
if (tcount > 3)
|
||||
|
||||
Reference in New Issue
Block a user