Non-functional: Sweep through the stack for consistent with "main" and entry point.
Partially addresses issue #513.
This commit is contained in:
parent
142785f324
commit
6fccb3cd75
26 changed files with 52 additions and 52 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue