From 431d62185bf20686ad709ec1201bbffd935dbd65 Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 30 Apr 2013 11:51:16 -0700 Subject: [PATCH] vlog95: Emit a new doing a shallow copy as an error. --- elab_scope.cc | 3 ++- tgt-vlog95/expr.c | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/elab_scope.cc b/elab_scope.cc index abe176349..91c1b9fb5 100644 --- a/elab_scope.cc +++ b/elab_scope.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2012 Stephen Williams (steve@icarus.com) + * Copyright (c) 2000-2013 Stephen Williams (steve@icarus.com) * Copyright CERN 2013 / Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it @@ -308,6 +308,7 @@ static void elaborate_scope_class(Design*des, NetScope*scope, // not allowed to escape a class method. NetScope*class_scope = new NetScope(0, hname_t(pclass->pscope_name()), NetScope::CLASS); + class_scope->set_line(pclass); class_scope->set_class_def(use_class); use_class->set_class_scope(class_scope); diff --git a/tgt-vlog95/expr.c b/tgt-vlog95/expr.c index a28b32d91..811d624df 100644 --- a/tgt-vlog95/expr.c +++ b/tgt-vlog95/expr.c @@ -724,6 +724,15 @@ void emit_expr(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) fprintf(vlog_out, "%s", ivl_expr_name(expr)); emit_expr_func(scope, expr, wid); break; + case IVL_EX_SHALLOWCOPY: + fprintf(vlog_out, " "); + emit_expr(scope, ivl_expr_oper2(expr), wid); + fprintf(stderr, "%s:%u: vlog95 error: New operator " + "is not supported.\n", + ivl_expr_file(expr), + ivl_expr_lineno(expr)); + vlog_errors += 1; + break; case IVL_EX_SIGNAL: emit_expr_signal(scope, expr, wid); break;