Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wall enables -Wcharmap-redef, and document -Wnested-comment #1528

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions man/rgbasm.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/asm/warning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions test/asm/multiple-charmaps.err
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions test/asm/pushc-without-switch.asm
Original file line number Diff line number Diff line change
@@ -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
Expand Down