Another tweak to the enumeration elaboration code
This commit is contained in:
parent
1e7509a021
commit
4660e0bf2f
|
|
@ -253,8 +253,10 @@ static void elaborate_scope_enumeration(Design*des, NetScope*scope,
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are padding/truncating a negative value for an
|
// If we are padding/truncating a negative value for an
|
||||||
// unsigned enumeration that is an error.
|
// unsigned enumeration that is an error or if the new
|
||||||
if ((cur_value.len() != enum_width) &&
|
// value does not have a defined width.
|
||||||
|
if (((cur_value.len() != enum_width) ||
|
||||||
|
! cur_value.has_len()) &&
|
||||||
! enum_type->signed_flag && cur_value.is_negative()) {
|
! enum_type->signed_flag && cur_value.is_negative()) {
|
||||||
cerr << use_enum->get_fileline()
|
cerr << use_enum->get_fileline()
|
||||||
<< ": error: Enumeration name " << cur->name
|
<< ": error: Enumeration name " << cur->name
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue