Commit 0f359f0e by John Kessenich

Change warning to error for use of double underscore.

parent 8d00fd0e
...@@ -55,8 +55,9 @@ ...@@ -55,8 +55,9 @@
// //
void TIntermMethod::traverse(TIntermTraverser* it) void TIntermMethod::traverse(TIntermTraverser* it)
{ {
// TODO: functionality: current tree should always resolve all methods as constants // Tree should always resolve all methods as constants
// 4.3 will leave some length methods as methods
// TODO: 4.3 functionality: some .length() will stay as methods
} }
void TIntermSymbol::traverse(TIntermTraverser* it) void TIntermSymbol::traverse(TIntermTraverser* it)
......
...@@ -452,14 +452,13 @@ bool TParseContext::reservedErrorCheck(int line, const TString& identifier) ...@@ -452,14 +452,13 @@ bool TParseContext::reservedErrorCheck(int line, const TString& identifier)
if (!symbolTable.atBuiltInLevel()) { if (!symbolTable.atBuiltInLevel()) {
if (identifier.substr(0, 3) == TString("gl_")) { if (identifier.substr(0, 3) == TString("gl_")) {
error(line, "reserved built-in name", "gl_", ""); error(line, "reserved built-in name", "gl_", "");
return true; return true;
} }
if (identifier.find("__") != TString::npos) { if (identifier.find("__") != TString::npos) {
//error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", ""); error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", "");
//return true;
// TODO: semantics: make this an error return true;
infoSink.info.message(EPrefixWarning, "Two consecutive underscores are reserved for future use.", line);
return false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment