mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix error messages in sym_GetConstantValue
This commit is contained in:
@@ -77,7 +77,7 @@ static inline bool sym_IsExported(struct sSymbol const *sym)
|
|||||||
|
|
||||||
int32_t sym_GetValue(struct sSymbol const *sym);
|
int32_t sym_GetValue(struct sSymbol const *sym);
|
||||||
uint32_t sym_CalcHash(const char *s);
|
uint32_t sym_CalcHash(const char *s);
|
||||||
void sym_SetExportAll(uint8_t set);
|
void sym_SetExportAll(bool set);
|
||||||
struct sSymbol *sym_AddLocalReloc(char const *tzSym);
|
struct sSymbol *sym_AddLocalReloc(char const *tzSym);
|
||||||
struct sSymbol *sym_AddReloc(char const *tzSym);
|
struct sSymbol *sym_AddReloc(char const *tzSym);
|
||||||
void sym_Export(char const *tzSym);
|
void sym_Export(char const *tzSym);
|
||||||
|
|||||||
@@ -279,11 +279,11 @@ uint32_t sym_GetConstantValue(char const *s)
|
|||||||
if (sym_IsConstant(psym))
|
if (sym_IsConstant(psym))
|
||||||
return sym_GetValue(psym);
|
return sym_GetValue(psym);
|
||||||
|
|
||||||
fatalerror("\"%s\" does not have a constant value", s);
|
yyerror("\"%s\" does not have a constant value", s);
|
||||||
|
} else {
|
||||||
|
yyerror("'%s' not defined", s);
|
||||||
}
|
}
|
||||||
|
|
||||||
yyerror("'%s' not defined", s);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -706,7 +706,7 @@ void sym_Ref(char const *tzSym)
|
|||||||
/*
|
/*
|
||||||
* Set whether to export all relocatable symbols by default
|
* Set whether to export all relocatable symbols by default
|
||||||
*/
|
*/
|
||||||
void sym_SetExportAll(uint8_t set)
|
void sym_SetExportAll(bool set)
|
||||||
{
|
{
|
||||||
exportall = set;
|
exportall = set;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,3 +18,4 @@ PRINTT "{X:S}\n"
|
|||||||
SECTION "Test", ROM0
|
SECTION "Test", ROM0
|
||||||
Label:
|
Label:
|
||||||
PRINTT "{x:Label}\n"
|
PRINTT "{x:Label}\n"
|
||||||
|
PRINTT "{x:@}\n"
|
||||||
|
|||||||
@@ -2,3 +2,6 @@ ERROR: bracketed-symbols.asm(16):
|
|||||||
Print types are only allowed for numbers
|
Print types are only allowed for numbers
|
||||||
ERROR: bracketed-symbols.asm(20):
|
ERROR: bracketed-symbols.asm(20):
|
||||||
"Label" does not have a constant value
|
"Label" does not have a constant value
|
||||||
|
ERROR: bracketed-symbols.asm(21):
|
||||||
|
Expected constant PC but section is not fixed
|
||||||
|
error: Assembly aborted (3 errors)!
|
||||||
|
|||||||
@@ -6,3 +6,5 @@ $2A
|
|||||||
10100111001
|
10100111001
|
||||||
0
|
0
|
||||||
You can't format me!
|
You can't format me!
|
||||||
|
0
|
||||||
|
0
|
||||||
|
|||||||
Reference in New Issue
Block a user