Fixes a problem with casts not being accepted in function parameters.

Issue #111

git-svn-id: http://picoc.googlecode.com/svn/trunk@483 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2010-09-04 13:39:58 +00:00
parent bb87abe223
commit b69b6d30cc

View file

@ -1012,7 +1012,7 @@ int ExpressionParse(struct ParseState *Parser, struct Value **Result)
{ {
/* it's either a new bracket level or a cast */ /* it's either a new bracket level or a cast */
enum LexToken BracketToken = LexGetToken(Parser, &LexValue, FALSE); enum LexToken BracketToken = LexGetToken(Parser, &LexValue, FALSE);
if (IS_TYPE_TOKEN(BracketToken) && StackTop != NULL && StackTop->Op != TokenSizeof) if (IS_TYPE_TOKEN(BracketToken) && (StackTop == NULL || StackTop->Op != TokenSizeof) )
{ {
/* it's a cast - get the new type */ /* it's a cast - get the new type */
struct ValueType *CastType; struct ValueType *CastType;