From 75eb73e0288b1f75a213707b2e7faafc82f5de8a Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 5 Aug 2018 08:25:33 -0700 Subject: 4485 --- subx/034discourage_raw_hex.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/subx/034discourage_raw_hex.cc b/subx/034discourage_raw_hex.cc index e5393bab..22f45b1d 100644 --- a/subx/034discourage_raw_hex.cc +++ b/subx/034discourage_raw_hex.cc @@ -14,8 +14,14 @@ void warn_on_raw_jumps(/*const*/ program& p) { for (int i = 0; i < SIZE(code.lines); ++i) { line& inst = code.lines.at(i); if (all_hex_bytes(inst) && has_operands(inst)) { - warn << "'" << to_string(inst) << "': using raw hex is not recommended.\n" << end(); + warn << "'" << to_string(inst) << "': using raw hex is not recommended\n" << end(); break; } } } + +:(scenario warn_on_hex_bytes_without_operands) +% Hide_warnings = true; +== 0x1 +bb 2a 00 00 00 # copy 0x2a (42) to EBX ++warn: 'bb 2a 00 00 00': using raw hex is not recommended -- cgit 1.4.1-2-gfad0