diff --git a/man/rgbasm.1 b/man/rgbasm.1 index 32cbd469d..10e82ec55 100644 --- a/man/rgbasm.1 +++ b/man/rgbasm.1 @@ -291,6 +291,13 @@ This warning is enabled by Warn when shifting macro arguments past their limits. This warning is enabled by .Fl Wextra . +.It Fl Wno-nested-comment +Warn when the block comment start sequence +.Ql /* +is found inside of a block comment. +Block comments cannot be nested, so an "inner" +.Ql */ +is likely to have ended the whole comment. .It Fl Wno-obsolete Warn when obsolete constructs such as the .Ic _PI diff --git a/src/asm/warning.cpp b/src/asm/warning.cpp index 8869f56e6..7baede8ff 100644 --- a/src/asm/warning.cpp +++ b/src/asm/warning.cpp @@ -191,6 +191,7 @@ static uint8_t const _wextraCommands[] = { static uint8_t const _weverythingCommands[] = { WARNING_BACKWARDS_FOR, WARNING_BUILTIN_ARG, + WARNING_CHARMAP_REDEF, WARNING_DIV, WARNING_EMPTY_DATA_DIRECTIVE, WARNING_EMPTY_MACRO_ARG, diff --git a/test/asm/multiple-charmaps.err b/test/asm/multiple-charmaps.err index 65eeef8c3..511e28963 100644 --- a/test/asm/multiple-charmaps.err +++ b/test/asm/multiple-charmaps.err @@ -2,6 +2,8 @@ warning: multiple-charmaps.asm(46) -> multiple-charmaps.asm::print_mapped(34): [ Treating multi-unit strings as numbers is deprecated warning: multiple-charmaps.asm(54) -> multiple-charmaps.asm::print_mapped(34): [-Wobsolete] Treating multi-unit strings as numbers is deprecated +warning: multiple-charmaps.asm(64): [-Wcharmap-redef] + Overriding charmap mapping warning: multiple-charmaps.asm(73) -> multiple-charmaps.asm::print_mapped(34): [-Wobsolete] Treating multi-unit strings as numbers is deprecated warning: multiple-charmaps.asm(95) -> multiple-charmaps.asm::print_mapped(34): [-Wobsolete] diff --git a/test/asm/pushc-without-switch.asm b/test/asm/pushc-without-switch.asm index 7209c3998..690cb43c2 100644 --- a/test/asm/pushc-without-switch.asm +++ b/test/asm/pushc-without-switch.asm @@ -1,5 +1,6 @@ ; Triggering a charmap realloc while the charmap has been pushed onto the stack used ; to induce a use-after-free. +opt Wno-charmap-redef pushc charmap "000000000000000000000000000000000",12 popc