mirror of
https://github.com/cc65/cc65.git
synced 2024-06-08 15:29:37 +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 */
|
/* Parse union fields */
|
||||||
UnionSize = 0;
|
UnionSize = 0;
|
||||||
while (CurTok.Tok != TOK_RCURLY) {
|
while (CurTok.Tok != TOK_RCURLY && CurTok.Tok != TOK_CEOF) {
|
||||||
|
|
||||||
/* Get the type of the entry */
|
/* Get the type of the entry */
|
||||||
DeclSpec Spec;
|
DeclSpec Spec;
|
||||||
|
@ -1217,7 +1217,7 @@ static SymEntry* ParseStructSpec (const char* Name, unsigned* DSFlags)
|
||||||
FlexibleMember = 0;
|
FlexibleMember = 0;
|
||||||
StructSize = 0;
|
StructSize = 0;
|
||||||
BitOffs = 0;
|
BitOffs = 0;
|
||||||
while (CurTok.Tok != TOK_RCURLY) {
|
while (CurTok.Tok != TOK_RCURLY && CurTok.Tok != TOK_CEOF) {
|
||||||
|
|
||||||
/* Get the type of the entry */
|
/* Get the type of the entry */
|
||||||
DeclSpec Spec;
|
DeclSpec Spec;
|
||||||
|
@ -1814,7 +1814,7 @@ static void ParseOldStyleParamDeclList (FuncDesc* F attribute ((unused)))
|
||||||
}
|
}
|
||||||
|
|
||||||
/* An optional list of type specifications follows */
|
/* An optional list of type specifications follows */
|
||||||
while (CurTok.Tok != TOK_LCURLY) {
|
while (CurTok.Tok != TOK_LCURLY && CurTok.Tok != TOK_CEOF) {
|
||||||
|
|
||||||
DeclSpec Spec;
|
DeclSpec Spec;
|
||||||
int NeedClean;
|
int NeedClean;
|
||||||
|
|
|
@ -551,7 +551,9 @@ void DeclareLocals (void)
|
||||||
/* A place to store info about potential initializations of auto variables */
|
/* A place to store info about potential initializations of auto variables */
|
||||||
CollAppend (&CurrentFunc->LocalsBlockStack, 0);
|
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) {
|
while (1) {
|
||||||
DeclSpec Spec;
|
DeclSpec Spec;
|
||||||
int NeedClean;
|
int NeedClean;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user