Closed bpadalino closed 3 months ago
The constant should be able to be internally cast /promoted to a universal_integer, right?
Implicit conversions only happen in the other direction (universal to other integer type). Also a constant is only globally- rather than locally-static.
Also a constant is only globally- rather than locally-static.
OK that's not true in this case as the initialiser is a locally static expression.
Try using x'length(integer'pos(ROWS))
instead (the result of 'pos
is a universal integer). This works in GHDL too.
That's a cute trick, but do you think this should be necessary given that Questa and Riviera both don't complain, or maybe something to be able to do with --relaxed
rules?
I made it a warning in --relaxed
mode as long as the parameter has an integer type.
Trying the following code:
I get the following error with nvc:
Questa and Riviera both don't even give a warning about this. The constant should be able to be internally cast /promoted to a universal_integer, right?