mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
Fixed repeated diagnosis when reading EOF in certain cases.
This commit is contained in:
parent
de3087a7e9
commit
afdf398a0b
@ -997,7 +997,7 @@ static SymEntry* ParseUnionSpec (const char* Name, unsigned* DSFlags)
|
||||
|
||||
/* Parse union fields */
|
||||
UnionSize = 0;
|
||||
while (CurTok.Tok != TOK_RCURLY) {
|
||||
while (CurTok.Tok != TOK_RCURLY && CurTok.Tok != TOK_CEOF) {
|
||||
|
||||
/* Get the type of the entry */
|
||||
DeclSpec Spec;
|
||||
@ -1217,7 +1217,7 @@ static SymEntry* ParseStructSpec (const char* Name, unsigned* DSFlags)
|
||||
FlexibleMember = 0;
|
||||
StructSize = 0;
|
||||
BitOffs = 0;
|
||||
while (CurTok.Tok != TOK_RCURLY) {
|
||||
while (CurTok.Tok != TOK_RCURLY && CurTok.Tok != TOK_CEOF) {
|
||||
|
||||
/* Get the type of the entry */
|
||||
DeclSpec Spec;
|
||||
@ -1814,7 +1814,7 @@ static void ParseOldStyleParamDeclList (FuncDesc* F attribute ((unused)))
|
||||
}
|
||||
|
||||
/* An optional list of type specifications follows */
|
||||
while (CurTok.Tok != TOK_LCURLY) {
|
||||
while (CurTok.Tok != TOK_LCURLY && CurTok.Tok != TOK_CEOF) {
|
||||
|
||||
DeclSpec Spec;
|
||||
int NeedClean;
|
||||
|
@ -551,7 +551,9 @@ void DeclareLocals (void)
|
||||
/* A place to store info about potential initializations of auto variables */
|
||||
CollAppend (&CurrentFunc->LocalsBlockStack, 0);
|
||||
|
||||
/* Loop until we don't find any more variables */
|
||||
/* Loop until we don't find any more variables. EOF is handled in the loop
|
||||
** as well.
|
||||
*/
|
||||
while (1) {
|
||||
DeclSpec Spec;
|
||||
int NeedClean;
|
||||
|
Loading…
Reference in New Issue
Block a user