oxidecomputer / p4

A P4 compiler
Mozilla Public License 2.0
111 stars 5 forks source link

Variable initialization overrides variable type. #37

Open rcgoodfellow opened 1 year ago

rcgoodfellow commented 1 year ago

This code

bit<16> x = 0;

results in an internal compiler type for x that is 128 bits wide since constants without a width specifier default to 128-bit values.