Closed jrudess closed 4 days ago
If an enum-value with a defined type is used in a comparison and that type matches the other side of the comparison, a warning still triggers.
Is it possible to relax the warning for the case of enum-values, or have I missed anything?
slangtest169.sv:12:18: warning: comparison between operands of different types ('int' and 'e_t') [-Wcomparison-mismatch] v.size() == E; ~~~~~~~~ ^~ ~
class C; typedef enum int { A = 0, C = 2, E = 4 } e_t; rand bit v[$]; constraint q { v.size() == E; } endclass
Done in 4dcf49d00c620686681afbf252c5295fa1f38122
If an enum-value with a defined type is used in a comparison and that type matches the other side of the comparison, a warning still triggers.
Is it possible to relax the warning for the case of enum-values, or have I missed anything?