Non-functional: Sweep through the stack for consistent with "main" and entry point.

Partially addresses issue #513.
This commit is contained in:
John Kessenich 2016-09-19 16:01:41 -06:00
parent 142785f324
commit 6fccb3cd75
26 changed files with 52 additions and 52 deletions

View file

@ -1058,8 +1058,8 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc,
if (function.getParamCount() > 0)
error(loc, "function cannot take any parameter(s)", function.getName().c_str(), "");
if (function.getType().getBasicType() != EbtVoid)
error(loc, "", function.getType().getBasicTypeString().c_str(), "main function cannot return a value");
intermediate.addMainCount();
error(loc, "", function.getType().getBasicTypeString().c_str(), "entry point cannot return a value");
intermediate.incrementEntryPointCount();
inMain = true;
} else
inMain = false;