This commit is contained in:
dmsc 2024-03-28 22:58:18 +00:00 committed by GitHub
commit 0d87fe403f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -1176,6 +1176,11 @@ if you want to access the "other" symbol <tt/bar/, you would have to write:
.endscope
</verb></tscreen>
The above example also shows that to search a scope that is not yet defined in
the code above the usage, you must use the namespace token (<tt/::/) and
specify the full scope name, to allow the assembler to create the scope at the
correct place.
<sect>Address sizes and memory models<label id="address-sizes"><p>

View File

@ -136,10 +136,10 @@ SymTable* ParseScopedIdent (StrBuf* Name, StrBuf* FullName)
SB_Append (FullName, Name);
/* Search for the child scope */
Scope = SymFindScope (Scope, Name, SYM_FIND_EXISTING);
Scope = SymFindScope (Scope, Name, SYM_ALLOC_NEW);
if (Scope == 0) {
/* Scope not found */
Error ("No such scope: '%m%p'", FullName);
Error ("Can't create scope: '%m%p'", FullName);
return 0;
}