vlog95: a zero width expression is special and is not a self determined context

This commit is contained in:
Cary R 2013-12-19 20:40:35 -08:00
parent 7fa2a4ccf3
commit 336b29955d
1 changed files with 3 additions and 2 deletions

View File

@ -267,8 +267,9 @@ static expr_sign_t expr_get_sign_type(ivl_expr_t expr, unsigned wid,
break; break;
} }
/* Check for a self-determined context. */ /* Check for a self-determined context. A zero width expression
if ((rtn == NO_SIGN) && (wid != expr_wid) && * is special and is not considered a self determined context. */
if ((rtn == NO_SIGN) && (wid != expr_wid) && expr_wid &&
! (is_full_prec && ((expr_wid < wid) || (type == IVL_EX_SIGNAL)))) { ! (is_full_prec && ((expr_wid < wid) || (type == IVL_EX_SIGNAL)))) {
if (ivl_expr_signed(expr)) rtn = NEED_SIGNED; if (ivl_expr_signed(expr)) rtn = NEED_SIGNED;
else rtn = NEED_UNSIGNED; else rtn = NEED_UNSIGNED;