From e734bbc0ccb97ff4d5788716679bf4a56077abc1 Mon Sep 17 00:00:00 2001 From: Evghenii Date: Thu, 23 Jan 2014 13:11:02 +0100 Subject: [PATCH] added new Errors --- expr.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/expr.cpp b/expr.cpp index 5be578eb..e7e99b83 100644 --- a/expr.cpp +++ b/expr.cpp @@ -7852,6 +7852,12 @@ SizeOfExpr::TypeCheck() { "struct type \"%s\".", type->GetString().c_str()); return NULL; } + if (type != NULL) + if (g->target->getISA() == Target::NVPTX && type->IsVaryingType()) + { + Error(pos, "\"sizeof\" with varying data types is not yet supported with \"nvptx\" target."); + return NULL; + } return this; } @@ -8646,6 +8652,11 @@ NewExpr::TypeCheck() { AssertPos(pos, m->errorCount > 0); return NULL; } + if (g->target->getISA() == Target::NVPTX && allocType->IsVaryingType()) + { + Error(pos, "\"sizeof\" with varying data types is not yet supported with \"nvptx\" target."); + return NULL; + } if (CastType(allocType) != NULL) { Error(pos, "Can't dynamically allocate storage for declared " "but not defined type \"%s\".", allocType->GetString().c_str());