aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-10-15 11:09:07 -0600
committerTom Tromey <tom@tromey.com>2023-11-29 14:29:43 -0700
commitd182e39881061b11d1eb85426d9a6953e3171bf5 (patch)
treec292f0615eee648207c86ae7035479cb518ea81a /gdb/windows-nat.c
parenta0dc1f9a12a4394463b9dbf5927166f2ab8518a6 (diff)
downloadfsf-binutils-gdb-d182e39881061b11d1eb85426d9a6953e3171bf5.zip
fsf-binutils-gdb-d182e39881061b11d1eb85426d9a6953e3171bf5.tar.gz
fsf-binutils-gdb-d182e39881061b11d1eb85426d9a6953e3171bf5.tar.bz2
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>
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r--gdb/windows-nat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 39a4e79..6544118 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2291,14 +2291,14 @@ redir_open (const char *redir_string, int *inp, int *out, int *err)
{
case '0':
fname++;
- /* FALLTHROUGH */
+ [[fallthrough]];
case '<':
fd = inp;
mode = O_RDONLY;
break;
case '1': case '2':
fname++;
- /* FALLTHROUGH */
+ [[fallthrough]];
case '>':
fd = (rc == '2') ? err : out;
mode = O_WRONLY | O_CREAT;