Fix parsing of push/pop so that #pragma warn works without.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4824 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
e048d2aeba
commit
d08ff2b6df
1 changed files with 7 additions and 5 deletions
|
@ -6,7 +6,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1998-2009, Ullrich von Bassewitz */
|
/* (C) 1998-2010, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
|
@ -238,7 +238,7 @@ static IntStack* GetWarning (StrBuf* B)
|
||||||
|
|
||||||
/* Done */
|
/* Done */
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -266,6 +266,8 @@ static PushPopResult ParsePushPop (StrBuf* B)
|
||||||
StrBuf Ident = AUTO_STRBUF_INITIALIZER;
|
StrBuf Ident = AUTO_STRBUF_INITIALIZER;
|
||||||
PushPopResult Res = PP_NONE;
|
PushPopResult Res = PP_NONE;
|
||||||
|
|
||||||
|
/* Remember the current string index, so we can go back in case of errors */
|
||||||
|
unsigned Index = SB_GetIndex (B);
|
||||||
|
|
||||||
/* Try to read an identifier */
|
/* Try to read an identifier */
|
||||||
if (SB_GetSym (B, &Ident, 0)) {
|
if (SB_GetSym (B, &Ident, 0)) {
|
||||||
|
@ -282,14 +284,14 @@ static PushPopResult ParsePushPop (StrBuf* B)
|
||||||
|
|
||||||
/* Skip the following comma */
|
/* Skip the following comma */
|
||||||
if (!GetComma (B)) {
|
if (!GetComma (B)) {
|
||||||
|
/* Error already flagged by GetComma */
|
||||||
Res = PP_ERROR;
|
Res = PP_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* Unknown keyword */
|
/* Unknown keyword, roll back */
|
||||||
Error ("Invalid pragma arguments");
|
SB_SetIndex (B, Index);
|
||||||
Res = PP_ERROR;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue