You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the shift is replaced with addition, the check works:
p4c/testdata/p4_16_samples/arith5-bmv2.p4(30): [--Werror=type-error] error: +: cannot be applied to expression '"aaaa"' with type 'string'
{ h.h.c = (int<64>)(h.h.a + "aaaa"); sm.egress_spec = 0; }
^
The text was updated successfully, but these errors were encountered:
vlstill
added
bug
This behavior is unintended and should be fixed.
core
Topics concerning the core segments of the compiler (frontend, midend, parser)
labels
Jan 9, 2025
I modified https://github.com/p4lang/p4c/blob/main/testdata/p4_16_samples/arith5-bmv2.p4:
Note that this code does not make any sense and should be rejected by the type checker. Howerver, it is not rejected:
$ ./build/p4c/p4test p4c/testdata/p4_16_samples/arith5-bmv2.p4 # [nothing, exitcode = 0]
If the shift is replaced with addition, the check works:
The text was updated successfully, but these errors were encountered: