diff options
author | Tom Tromey <tom@tromey.com> | 2023-10-15 11:09:07 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-11-29 14:29:43 -0700 |
commit | d182e39881061b11d1eb85426d9a6953e3171bf5 (patch) | |
tree | c292f0615eee648207c86ae7035479cb518ea81a /gdb/i386-tdep.c | |
parent | a0dc1f9a12a4394463b9dbf5927166f2ab8518a6 (diff) | |
download | gdb-d182e39881061b11d1eb85426d9a6953e3171bf5.zip gdb-d182e39881061b11d1eb85426d9a6953e3171bf5.tar.gz 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/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 8efd858..e00c3bd 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -6011,7 +6011,7 @@ Do you want to stop the program?"), ir.addr -= 1; goto no_support; } - /* FALLTHROUGH */ + [[fallthrough]]; case 0x0fb2: /* lss Gv */ case 0x0fb4: /* lfs Gv */ case 0x0fb5: /* lgs Gv */ @@ -6248,7 +6248,7 @@ Do you want to stop the program?"), I386_SAVE_FPU_REGS)) return -1; } - /* Fall through */ + [[fallthrough]]; default: if (record_full_arch_list_add_mem (addr64, 2)) return -1; @@ -6787,7 +6787,7 @@ Do you want to stop the program?"), ir.addr -= 1; goto no_support; } - /* FALLTHROUGH */ + [[fallthrough]]; case 0xf5: /* cmc */ case 0xf8: /* clc */ case 0xf9: /* stc */ @@ -7229,7 +7229,7 @@ Do you want to stop the program?"), else if (ir.rm == 1) break; } - /* Fall through. */ + [[fallthrough]]; case 3: /* lidt */ if (ir.mod == 3) { |