diff options
Diffstat (limited to 'src/analyzer.c')
| -rw-r--r-- | src/analyzer.c | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/src/analyzer.c b/src/analyzer.c index b67bc91..6154029 100644 --- a/src/analyzer.c +++ b/src/analyzer.c @@ -296,6 +296,8 @@ analyzedecl(struct azctx *ctx, idx_t i)  		nctx.decl = sv;  		ni = analyzeexpr(&nctx, p.rhs);  		rtype = ctx->types[p.rhs]; +		if (isstatic && !TESTBIT(ctx->cnst, p.rhs)) +			err("analyzer: Assigning non-constant expression to static");  	} else  		ni = fwdnode(ctx->ast, i);  |