mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Remove previously deprecated features (#1777)
- Treating multi-unit strings as numbers - `rgbasm -Wnumeric-string` - `ldio [c], a` and `ldio a, [c]` (use `ldh`) - `ld [c], a` and `ld a, [c]` (use `ldh`) - `ldh [$xx], a` and `ldh a, [$xx]` (use `$FFxx`)
This commit is contained in:
@@ -31,7 +31,7 @@ void act_StaticAssert(AssertionType type, int32_t condition, std::string const &
|
||||
std::optional<std::string> act_ReadFile(std::string const &name, uint32_t maxLen);
|
||||
|
||||
uint32_t act_CharToNum(std::string const &str);
|
||||
uint32_t act_StringToNum(std::vector<int32_t> const &str);
|
||||
uint32_t act_StringToNum(std::string const &str);
|
||||
|
||||
int32_t act_CharVal(std::string const &str);
|
||||
int32_t act_CharVal(std::string const &str, int32_t negIdx);
|
||||
|
||||
@@ -40,7 +40,7 @@ struct Expression {
|
||||
void makeUnaryOp(RPNCommand op, Expression &&src);
|
||||
void makeBinaryOp(RPNCommand op, Expression &&src1, Expression const &src2);
|
||||
|
||||
bool makeCheckHRAM();
|
||||
void makeCheckHRAM();
|
||||
void makeCheckRST();
|
||||
void makeCheckBitIndex(uint8_t mask);
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ struct Diagnostics {
|
||||
}
|
||||
|
||||
WarningBehavior getWarningBehavior(W id) const;
|
||||
std::string processWarningFlag(char const *flag);
|
||||
void processWarningFlag(char const *flag);
|
||||
};
|
||||
|
||||
template<typename L, typename W>
|
||||
@@ -121,18 +121,18 @@ WarningBehavior Diagnostics<L, W>::getWarningBehavior(W id) const {
|
||||
}
|
||||
|
||||
template<typename L, typename W>
|
||||
std::string Diagnostics<L, W>::processWarningFlag(char const *flag) {
|
||||
void Diagnostics<L, W>::processWarningFlag(char const *flag) {
|
||||
std::string rootFlag = flag;
|
||||
|
||||
// Check for `-Werror` or `-Wno-error` to return early
|
||||
if (rootFlag == "error") {
|
||||
// `-Werror` promotes warnings to errors
|
||||
state.warningsAreErrors = true;
|
||||
return rootFlag;
|
||||
return;
|
||||
} else if (rootFlag == "no-error") {
|
||||
// `-Wno-error` disables promotion of warnings to errors
|
||||
state.warningsAreErrors = false;
|
||||
return rootFlag;
|
||||
return;
|
||||
}
|
||||
|
||||
auto [flagState, param] = getInitialWarningState(rootFlag);
|
||||
@@ -174,12 +174,12 @@ std::string Diagnostics<L, W>::processWarningFlag(char const *flag) {
|
||||
warning.state = WARNING_DISABLED;
|
||||
}
|
||||
}
|
||||
return rootFlag;
|
||||
return;
|
||||
}
|
||||
|
||||
if (param.has_value()) {
|
||||
warnx("Unknown warning flag parameter \"%s=%" PRIu32 "\"", rootFlag.c_str(), *param);
|
||||
return rootFlag;
|
||||
return;
|
||||
}
|
||||
|
||||
// Try to match against a "meta" warning
|
||||
@@ -194,19 +194,18 @@ std::string Diagnostics<L, W>::processWarningFlag(char const *flag) {
|
||||
state.metaStates[id].update(flagState);
|
||||
}
|
||||
}
|
||||
return rootFlag;
|
||||
return;
|
||||
}
|
||||
|
||||
// Try to match against a "normal" flag
|
||||
for (W id : EnumSeq(W::NB_PLAIN_WARNINGS)) {
|
||||
if (rootFlag == warningFlags[id].name) {
|
||||
state.flagStates[id].update(flagState);
|
||||
return rootFlag;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
warnx("Unknown warning flag \"%s\"", rootFlag.c_str());
|
||||
return rootFlag;
|
||||
}
|
||||
|
||||
#endif // RGBDS_DIAGNOSTICS_HPP
|
||||
|
||||
Reference in New Issue
Block a user