fixed float constants to be read as doubles

This commit is contained in:
egaburov
2013-09-13 09:25:52 +02:00
parent 40af8d6ed5
commit 715b828266
2 changed files with 5 additions and 5 deletions

View File

@@ -149,7 +149,7 @@ struct ForeachDimension {
%union {
uint64_t intVal;
float floatVal;
double floatVal;
std::string *stringVal;
const char *constCharPtr;
@@ -326,8 +326,8 @@ primary_expression
(uint64_t)yylval.intVal, @1);
}
| TOKEN_FLOAT_CONSTANT {
$$ = new ConstExpr(AtomicType::UniformFloat->GetAsConstType(),
(float)yylval.floatVal, @1);
$$ = new ConstExpr(AtomicType::UniformDouble->GetAsConstType(),
yylval.floatVal, @1);
}
| TOKEN_TRUE {
$$ = new ConstExpr(AtomicType::UniformBool->GetAsConstType(), true, @1);