mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Using a dedicated SC_FICTITIOUS flag in case of parsing errors.
This commit is contained in:
parent
bde5be6793
commit
4dfc1a5ded
@ -148,7 +148,7 @@ static void Parse (void)
|
||||
break;
|
||||
}
|
||||
|
||||
if ((Decl.StorageClass & SC_ALIAS) == SC_ALIAS) {
|
||||
if ((Decl.StorageClass & SC_FICTITIOUS) == SC_FICTITIOUS) {
|
||||
/* Failed parsing */
|
||||
goto SkipOneDecl;
|
||||
}
|
||||
|
@ -1907,7 +1907,7 @@ void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
|
||||
|
||||
if (PrevErrorCount != ErrorCount) {
|
||||
/* Don't give storage if the declaration is not parsed correctly */
|
||||
D->StorageClass |= SC_DECL | SC_ALIAS;
|
||||
D->StorageClass |= SC_DECL | SC_FICTITIOUS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -455,7 +455,7 @@ static void ParseOneDecl (const DeclSpec* Spec)
|
||||
}
|
||||
|
||||
/* If the symbol is not marked as external, it will be defined now */
|
||||
if ((Decl.StorageClass & SC_ALIAS) == 0 &&
|
||||
if ((Decl.StorageClass & SC_FICTITIOUS) == 0 &&
|
||||
(Decl.StorageClass & SC_EXTERN) == 0) {
|
||||
Decl.StorageClass |= SC_DEF;
|
||||
}
|
||||
|
@ -106,6 +106,7 @@ struct CodeEntry;
|
||||
#define SC_GOTO_IND 0x800000U /* Indirect goto */
|
||||
|
||||
#define SC_ALIAS 0x01000000U /* Alias of anonymous field */
|
||||
#define SC_FICTITIOUS 0x02000000U /* Symbol is fictitious */
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user