shithub: rgbds

Download patch

ref: 8e92383fa35e1955d891d1e6de9c70a8cc82ff25
parent: 0793e9effe02e1ccd623704412aa750063f7d46b
author: ISSOtm <[email protected]>
date: Tue Jul 21 17:05:54 EDT 2020

Enable -Wobsolete by default

The fact that deprecations were common and quickly acted upon was raised by
some users

--- a/src/asm/rgbasm.1
+++ b/src/asm/rgbasm.1
@@ -219,14 +219,12 @@
 Warn when a string too long to fit in internal buffers is encountered.
 This warning is enabled by
 .Fl Wall .
-.It Fl Wobsolete
+.It Fl Wno-obsolete
 Warn when obsolete constructs such as the
 .Ic jp [hl]
 instruction or
 .Ic HOME
 section type are encountered.
-This warning is enabled by
-.Fl Wextra .
 .It Fl Wshift
 Warn when shifting right a negative value.
 Use a division by 2^N instead.
--- a/src/asm/warning.c
+++ b/src/asm/warning.c
@@ -35,7 +35,7 @@
 	WARNING_DISABLED, /* Empty entry in `db`, `dw` or `dl` */
 	WARNING_DISABLED, /* Constants too large */
 	WARNING_DISABLED, /* String too long for internal buffers */
-	WARNING_DISABLED, /* Obsolete things */
+	WARNING_ENABLED,  /* Obsolete things */
 	WARNING_DISABLED, /* Shifting undefined behavior */
 	WARNING_DISABLED, /* Strange shift amount */
 	WARNING_ENABLED,  /* Implicit truncation loses some bits */
@@ -101,7 +101,6 @@
 /* Warnings that are less likely to indicate an error */
 static uint8_t const _wextraCommands[] = {
 	WARNING_EMPTY_ENTRY,
-	WARNING_OBSOLETE,
 	META_WARNING_DONE
 };