Fix warning "(vcom-1246) Range 1 to 0 is null" for Modelsim/Questa.
This is a minor fix to avoid unnecessary warnings with Questa and Modelsim.
I also once needed a null vector and I also reported a similar issue: https://github.com/VUnit/vunit/issues/993 I was just wondering if this trick can be used for almost all null vector cases? Sry, for hijacking this PR. 😬
I would say that yes it can. At least for me, I was able to solve this kind of warnings for Modelsim and Questa using this approach.
Thx for the reply. I think then the feature is almost not needed really. Those warnings are for real very annoying...
I have to disagree on the "almost not needed really", specially if we can fix a warning with very low effort like this one. I would rather have a compilation with zero warnings than having avoidable ones that could "hide" important warnings that shall be addressed.
Yeah, I agree with you - removing those useless warnings improves the debugging experience. Btw, I actually meant the null vector as a useless feature. However, I'm not sure if yours could be used in every (corner) case.