mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Allow OPT to modify -W
Warning flags are processed individually; PUSHO and POPO (re)store all the warning states.
This commit is contained in:
@@ -15,6 +15,7 @@ void opt_B(char chars[2]);
|
||||
void opt_G(char chars[4]);
|
||||
void opt_P(uint8_t fill);
|
||||
void opt_L(bool optimize);
|
||||
void opt_W(char const *flag);
|
||||
void opt_Parse(char const *option);
|
||||
|
||||
void opt_Push(void);
|
||||
|
||||
@@ -13,6 +13,13 @@
|
||||
|
||||
extern unsigned int nbErrors;
|
||||
|
||||
enum WarningState {
|
||||
WARNING_DEFAULT,
|
||||
WARNING_DISABLED,
|
||||
WARNING_ENABLED,
|
||||
WARNING_ERROR
|
||||
};
|
||||
|
||||
enum WarningID {
|
||||
WARNING_ASSERT, /* Assertions */
|
||||
WARNING_BACKWARDS_FOR, /* `for` loop with backwards range */
|
||||
@@ -43,6 +50,9 @@ enum WarningID {
|
||||
#define NB_META_WARNINGS (NB_WARNINGS_ALL - NB_WARNINGS)
|
||||
};
|
||||
|
||||
extern enum WarningState warningStates[NB_WARNINGS];
|
||||
extern bool warningsAreErrors;
|
||||
|
||||
void processWarningFlag(char const *flag);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user