"int a = *'" now reports an error
git-svn-id: http://picoc.googlecode.com/svn/trunk@316 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
f4b2bdcc64
commit
2f8f365d46
|
@ -1076,6 +1076,9 @@ int ExpressionParse(struct ParseState *Parser, struct Value **Result)
|
||||||
/* all that should be left is a single value on the stack */
|
/* all that should be left is a single value on the stack */
|
||||||
if (Parser->Mode == RunModeRun)
|
if (Parser->Mode == RunModeRun)
|
||||||
{
|
{
|
||||||
|
if (StackTop->Order != OrderNone || StackTop->Next != NULL)
|
||||||
|
ProgramFail(Parser, "invalid expression");
|
||||||
|
|
||||||
*Result = StackTop->p.Val;
|
*Result = StackTop->p.Val;
|
||||||
HeapPopStack(StackTop, sizeof(struct ExpressionStack));
|
HeapPopStack(StackTop, sizeof(struct ExpressionStack));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue