p4-spec
p4-spec copied to clipboard
headerstackvar.size is it really a compile time constant or not?
Take:
header h{}
struct s { h[2] f; }
void func(s v)
{
bit<(v.f.size)> v1;
}
The current specifications has:
- `hs.size`: produces a 32-bit unsigned integer that returns the
size of the header stack (a compile-time constant).
....
The following are compile-time known values:
...
- The `size` field of a value with type header stack.
Is the value a constant or just a known value at compile time? Yes there can be (and should be) slight difference between the two?
This is related to https://github.com/p4lang/p4-spec/issues/932 too. I don't expect an answer right away since this can get complex really.
Can we fix this while leaving #932 open?
In the interest of tidying up the set of active issues on the P4 specification repository, I'm marking this as "stalled" and closing it. Of course, we can always re-open it in the future if there is interest in resurrecting it.