ref: c637447d5db263820b45aba8af08d6eb3b241d9f
parent: ac2cefdd8765e3daafea8eba405fc50e63626aaa
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sun Feb 28 16:17:39 EST 2021
Make the "db/dw/dl directive without data in ROM" warning more specific Also use uppercase for DB/DW/DL to be consistent
--- a/src/asm/section.c
+++ b/src/asm/section.c
@@ -604,7 +604,8 @@
reserveSpace(skip);
if (!ds && sect_HasData(pCurrentSection->type))
- warning(WARNING_EMPTY_DATA_DIRECTIVE, "db/dw/dl directive without data in ROM\n");
+ warning(WARNING_EMPTY_DATA_DIRECTIVE, "%s directive without data in ROM\n",
+ (skip == 4) ? "DL" : (skip == 2) ? "DW" : "DB");
if (!sect_HasData(pCurrentSection->type)) {
growSection(skip);
--- a/test/asm/empty-data-directive.err
+++ b/test/asm/empty-data-directive.err
@@ -1,6 +1,6 @@
warning: empty-data-directive.asm(6): [-Wempty-data-directive]
- db/dw/dl directive without data in ROM
+ DB directive without data in ROM
warning: empty-data-directive.asm(7): [-Wempty-data-directive]
- db/dw/dl directive without data in ROM
+ DW directive without data in ROM
warning: empty-data-directive.asm(8): [-Wempty-data-directive]
- db/dw/dl directive without data in ROM
+ DL directive without data in ROM