mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Implement -Wtruncation=level (#931)
* Implement -Wtruncation=level -Wtruncation=0 is the same as the current -Wno-truncation. -Wtruncation=2 is the same as the current -Wtruncation. -Wtruncation=1 is the new default; it's less strict, allowing N-bit values to be between -2**N and 2**N (exclusive). * Implement generic "parametrized warning" system * Test more `Wtruncation` variants Co-authored-by: ISSOtm <eldredhabert0@gmail.com>
This commit is contained in:
@@ -17,7 +17,8 @@ struct OptStackEntry {
|
||||
bool haltnop;
|
||||
bool optimizeLoads;
|
||||
bool warningsAreErrors;
|
||||
enum WarningState warningStates[NB_WARNINGS];
|
||||
// Don't be confused: we use the size of the **global variable** `warningStates`!
|
||||
enum WarningState warningStates[sizeof(warningStates)];
|
||||
struct OptStackEntry *next;
|
||||
};
|
||||
|
||||
@@ -48,7 +49,7 @@ void opt_L(bool optimize)
|
||||
optimizeLoads = optimize;
|
||||
}
|
||||
|
||||
void opt_W(char const *flag)
|
||||
void opt_W(char *flag)
|
||||
{
|
||||
processWarningFlag(flag);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user