mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 11:12:07 +00:00
Improve helpers.h
Use C11 standard _Noreturn instead of attributes (except, of course, MSVC) Remove unused helpers Avoid trapping in release builds, in favor of just unreachability Improve shim when __builtin_* are not available
This commit is contained in:
@@ -318,7 +318,7 @@ static void processCommand(enum LinkerScriptCommand command, uint16_t arg,
|
||||
{
|
||||
switch (command) {
|
||||
case COMMAND_INVALID:
|
||||
trap_;
|
||||
unreachable_();
|
||||
|
||||
case COMMAND_ORG:
|
||||
break;
|
||||
@@ -391,12 +391,12 @@ struct SectionPlacement *script_NextSection(void)
|
||||
|
||||
switch (parserState) {
|
||||
case PARSER_FIRSTTIME:
|
||||
trap_;
|
||||
unreachable_();
|
||||
|
||||
case PARSER_LINESTART:
|
||||
switch (token->type) {
|
||||
case TOKEN_INVALID:
|
||||
trap_;
|
||||
unreachable_();
|
||||
|
||||
case TOKEN_EOF:
|
||||
if (!popFile())
|
||||
|
||||
Reference in New Issue
Block a user