mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Refactor warnings and errors (#1728)
* Remove `err` and `warn`, keep `errx` and `warnx`, using them in RGBGFX too * Separate RGBGFX and RGBLINK warnings/errors from main options * Separate `report` function into `error` and `fatal` messages * Implicit newlines for most RGBASM errors
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "link/main.hpp"
|
||||
#include "link/section.hpp"
|
||||
#include "link/warning.hpp"
|
||||
|
||||
std::unordered_map<std::string, Symbol *> symbols;
|
||||
std::unordered_map<std::string, std::vector<Symbol *>> localSymbols;
|
||||
@@ -36,7 +37,7 @@ void sym_AddSymbol(Symbol &symbol) {
|
||||
|
||||
// Check if the symbol already exists with a different value
|
||||
if (other && !(symValue && otherValue && *symValue == *otherValue)) {
|
||||
fprintf(stderr, "error: \"%s\" is defined as ", symbol.name.c_str());
|
||||
errorNoDump("\"%s\" is defined as ", symbol.name.c_str());
|
||||
if (symValue) {
|
||||
fprintf(stderr, "%" PRId32, *symValue);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user