diff --git a/Analyser/Static/Commodore/StaticAnalyser.cpp b/Analyser/Static/Commodore/StaticAnalyser.cpp index 0a7a55e3e..90bd0b624 100644 --- a/Analyser/Static/Commodore/StaticAnalyser.cpp +++ b/Analyser/Static/Commodore/StaticAnalyser.cpp @@ -94,6 +94,7 @@ Analyser::Static::TargetList Analyser::Static::Commodore::GetTargets(const Media switch(files.front().starting_address) { default: LOG("Unrecognised loading address for Commodore program: " << PADHEX(4) << files.front().starting_address); + [[fallthrough]]; case 0x1001: memory_model = Target::MemoryModel::Unexpanded; break; diff --git a/Components/5380/ncr5380.cpp b/Components/5380/ncr5380.cpp index 3fb2a9514..52f3d4570 100644 --- a/Components/5380/ncr5380.cpp +++ b/Components/5380/ncr5380.cpp @@ -263,6 +263,7 @@ void NCR5380::scsi_bus_did_change(SCSI::Bus *, SCSI::BusState new_state, double case ExecutionState::WaitingForBusy: if(!(new_state & SCSI::Line::Busy) || time_since_change < SCSI::DeskewDelay) return; state_ = ExecutionState::WatchingBusy; + [[fallthrough]]; case ExecutionState::WatchingBusy: if(!(new_state & SCSI::Line::Busy)) { diff --git a/Components/DiskII/IWM.cpp b/Components/DiskII/IWM.cpp index 3a21a8fab..17438d2db 100644 --- a/Components/DiskII/IWM.cpp +++ b/Components/DiskII/IWM.cpp @@ -307,8 +307,8 @@ void IWM::run_for(const Cycles cycles) { } else { shift_register_ = sense(); } + [[fallthrough]]; - /* Deliberate fallthrough. */ default: if(drive_is_rotating_[active_drive_]) drives_[active_drive_]->run_for(cycles); break; diff --git a/Machines/Atari/ST/AtariST.cpp b/Machines/Atari/ST/AtariST.cpp index 55dd45d3b..6ddf2dfce 100644 --- a/Machines/Atari/ST/AtariST.cpp +++ b/Machines/Atari/ST/AtariST.cpp @@ -237,6 +237,7 @@ class ConcreteMachine: memory = rom_.data(); break; } + [[fallthrough]]; case BusDevice::RAM: memory = ram_.data(); break; diff --git a/Machines/ColecoVision/ColecoVision.cpp b/Machines/ColecoVision/ColecoVision.cpp index 0de8f56d0..c8ebd9074 100644 --- a/Machines/ColecoVision/ColecoVision.cpp +++ b/Machines/ColecoVision/ColecoVision.cpp @@ -224,6 +224,7 @@ class ConcreteMachine: switch(cycle.operation) { case CPU::Z80::PartialMachineCycle::ReadOpcode: if(!address) pc_zero_accesses_++; + [[fallthrough]]; case CPU::Z80::PartialMachineCycle::Read: if(address < 0x2000) { if(super_game_module_.replace_bios) { diff --git a/Machines/Electron/Electron.cpp b/Machines/Electron/Electron.cpp index 1bf54f0f8..53fb9b028 100644 --- a/Machines/Electron/Electron.cpp +++ b/Machines/Electron/Electron.cpp @@ -215,7 +215,8 @@ class ConcreteMachine: activity_observer_->set_led_status(caps_led, caps_led_state_); } - // deliberate fallthrough; fe07 contains the display mode. + [[fallthrough]]; // fe07 contains the display mode. + case 0xfe02: case 0xfe03: case 0xfe08: case 0xfe09: case 0xfe0a: case 0xfe0b: diff --git a/Machines/MSX/MSX.cpp b/Machines/MSX/MSX.cpp index febf9dbba..30695d0e9 100644 --- a/Machines/MSX/MSX.cpp +++ b/Machines/MSX/MSX.cpp @@ -492,6 +492,8 @@ class ConcreteMachine: performed_unmapped_access_ = true; } pc_address_ = address; // This is retained so as to be able to name the source of an access to cartridge handlers. + [[fallthrough]]; + case CPU::Z80::PartialMachineCycle::Read: if(read_pointers_[address >> 13]) { *cycle.value = read_pointers_[address >> 13][address & 8191]; diff --git a/Machines/ZX8081/ZX8081.cpp b/Machines/ZX8081/ZX8081.cpp index 6108ef28a..e998da86f 100644 --- a/Machines/ZX8081/ZX8081.cpp +++ b/Machines/ZX8081/ZX8081.cpp @@ -269,6 +269,7 @@ template class ConcreteMachine: tape_player_.set_motor_control((address >= automatic_tape_motor_start_address_) && (address < automatic_tape_motor_end_address_)); } is_opcode_read = true; + [[fallthrough]]; case CPU::Z80::PartialMachineCycle::Read: if(address < ram_base_) { diff --git a/Processors/Z80/Implementation/Z80Implementation.hpp b/Processors/Z80/Implementation/Z80Implementation.hpp index 2685e907e..677d55d69 100644 --- a/Processors/Z80/Implementation/Z80Implementation.hpp +++ b/Processors/Z80/Implementation/Z80Implementation.hpp @@ -833,7 +833,8 @@ template < class T, // MARK: - Special-case Flow case MicroOp::BeginIRQMode0: - pc_increment_ = 0; // deliberate fallthrough + pc_increment_ = 0; + [[fallthrough]]; case MicroOp::BeginIRQ: iff2_ = iff1_ = false; request_status_ &= ~Interrupt::IRQ;