Skip to content

Commit d5159f6

Browse files
authored
-Wall enables -Wcharmap-redef, and document -Wnested-comment (#1528)
1 parent c7a029a commit d5159f6

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

man/rgbasm.1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,13 @@ This warning is enabled by
291291
Warn when shifting macro arguments past their limits.
292292
This warning is enabled by
293293
.Fl Wextra .
294+
.It Fl Wno-nested-comment
295+
Warn when the block comment start sequence
296+
.Ql /*
297+
is found inside of a block comment.
298+
Block comments cannot be nested, so an "inner"
299+
.Ql */
300+
is likely to have ended the whole comment.
294301
.It Fl Wno-obsolete
295302
Warn when obsolete constructs such as the
296303
.Ic _PI

src/asm/warning.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ static uint8_t const _wextraCommands[] = {
191191
static uint8_t const _weverythingCommands[] = {
192192
WARNING_BACKWARDS_FOR,
193193
WARNING_BUILTIN_ARG,
194+
WARNING_CHARMAP_REDEF,
194195
WARNING_DIV,
195196
WARNING_EMPTY_DATA_DIRECTIVE,
196197
WARNING_EMPTY_MACRO_ARG,

test/asm/multiple-charmaps.err

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ warning: multiple-charmaps.asm(46) -> multiple-charmaps.asm::print_mapped(34): [
22
Treating multi-unit strings as numbers is deprecated
33
warning: multiple-charmaps.asm(54) -> multiple-charmaps.asm::print_mapped(34): [-Wobsolete]
44
Treating multi-unit strings as numbers is deprecated
5+
warning: multiple-charmaps.asm(64): [-Wcharmap-redef]
6+
Overriding charmap mapping
57
warning: multiple-charmaps.asm(73) -> multiple-charmaps.asm::print_mapped(34): [-Wobsolete]
68
Treating multi-unit strings as numbers is deprecated
79
warning: multiple-charmaps.asm(95) -> multiple-charmaps.asm::print_mapped(34): [-Wobsolete]

test/asm/pushc-without-switch.asm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; Triggering a charmap realloc while the charmap has been pushed onto the stack used
22
; to induce a use-after-free.
3+
opt Wno-charmap-redef
34
pushc
45
charmap "000000000000000000000000000000000",12
56
popc

0 commit comments

Comments
 (0)