From 739e4e73ef5579a9beddf6a5f9790ce4cb796d13 Mon Sep 17 00:00:00 2001 From: Evghenii Date: Fri, 21 Feb 2014 12:08:09 +0100 Subject: [PATCH] make static illegal --- stmt.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stmt.cpp b/stmt.cpp index ee9e819c..4cca5d40 100644 --- a/stmt.cpp +++ b/stmt.cpp @@ -265,9 +265,12 @@ DeclStmt::EmitCode(FunctionEmitContext *ctx) const { if (sym->storageClass == SC_STATIC) { if (g->target->getISA() == Target::NVPTX && !sym->type->IsConstType()) - PerformanceWarning(sym->pos, - "Non-constant static variable ""\"%s\" is stored in __global address sace with ""\"nvptx\" target.", + { + Error(sym->pos, + "Non-constant static variable ""\"%s\" is not supported with ""\"nvptx\" target.", sym->name.c_str()); + return; + } if (g->target->getISA() == Target::NVPTX && sym->type->IsVaryingType()) PerformanceWarning(sym->pos, "\"const static varying\" variable ""\"%s\" is stored in __global address space with ""\"nvptx\" target.",