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());
|
"struct type \"%s\".", type->GetString().c_str());
|
||||||
return NULL;
|
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;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -8646,6 +8652,11 @@ NewExpr::TypeCheck() {
|
|||||||
AssertPos(pos, m->errorCount > 0);
|
AssertPos(pos, m->errorCount > 0);
|
||||||
return NULL;
|
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) {
|
if (CastType<UndefinedStructType>(allocType) != NULL) {
|
||||||
Error(pos, "Can't dynamically allocate storage for declared "
|
Error(pos, "Can't dynamically allocate storage for declared "
|
||||||
"but not defined type \"%s\".", allocType->GetString().c_str());
|
"but not defined type \"%s\".", allocType->GetString().c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user