Change warning to error for use of double underscore.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21765 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-05-29 22:40:31 +00:00
parent 8d00fd0e29
commit 0f359f0e35
2 changed files with 7 additions and 7 deletions

View file

@ -452,14 +452,13 @@ bool TParseContext::reservedErrorCheck(int line, const TString& identifier)
if (!symbolTable.atBuiltInLevel()) {
if (identifier.substr(0, 3) == TString("gl_")) {
error(line, "reserved built-in name", "gl_", "");
return true;
}
if (identifier.find("__") != TString::npos) {
//error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", "");
//return true;
// TODO: semantics: make this an error
infoSink.info.message(EPrefixWarning, "Two consecutive underscores are reserved for future use.", line);
return false;
error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", "");
return true;
}
}