added new Errors
This commit is contained in:
11
expr.cpp
11
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<UndefinedStructType>(allocType) != NULL) {
|
||||
Error(pos, "Can't dynamically allocate storage for declared "
|
||||
"but not defined type \"%s\".", allocType->GetString().c_str());
|
||||
|
||||
Reference in New Issue
Block a user