Commit 73438870 by Zhenyao Mo

Remove literal overflow error reporting in compiler.

BUG= R=alokp@chromium.org Review URL: https://codereview.appspot.com/13505047
parent fc75e217
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 2 #define MINOR_VERSION 2
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 2444 #define BUILD_REVISION 2445
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -228,14 +228,6 @@ primary_expression ...@@ -228,14 +228,6 @@ primary_expression
$$ = $1; $$ = $1;
} }
| INTCONSTANT { | INTCONSTANT {
//
// INT_TYPE is only 16-bit plus sign bit for vertex/fragment shaders,
// check for overflow for constants
//
if (abs($1.i) >= (1 << 16)) {
context->error(@1, " integer constant overflow", "");
context->recover();
}
ConstantUnion *unionArray = new ConstantUnion[1]; ConstantUnion *unionArray = new ConstantUnion[1];
unionArray->setIConst($1.i); unionArray->setIConst($1.i);
$$ = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), @1); $$ = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), @1);
......
...@@ -2298,14 +2298,6 @@ yyreduce: ...@@ -2298,14 +2298,6 @@ yyreduce:
case 6: case 6:
{ {
//
// INT_TYPE is only 16-bit plus sign bit for vertex/fragment shaders,
// check for overflow for constants
//
if (abs((yyvsp[(1) - (1)].lex).i) >= (1 << 16)) {
context->error((yylsp[(1) - (1)]), " integer constant overflow", "");
context->recover();
}
ConstantUnion *unionArray = new ConstantUnion[1]; ConstantUnion *unionArray = new ConstantUnion[1];
unionArray->setIConst((yyvsp[(1) - (1)].lex).i); unionArray->setIConst((yyvsp[(1) - (1)].lex).i);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), (yylsp[(1) - (1)])); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), (yylsp[(1) - (1)]));
......
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