Closed jaehyun1ee closed 3 months ago
Would you be willing to create a PR with a new row for the string type, with entries that match what p4c currently supports, so we can discuss it in a future P4 language design work group meeting? It seems reasonable to me if the spec follows what the implementation currently does, but discussion at such a meeting might lead to other conclusions.
The section 7.2.8. Type nesting rules enumerates what type can be aliased or not by a
typedef
declaration.The table below seems to omit the case for the
string
type. I expect that new type declaration would not allowstring
type, but I wonder if P4 allows it for typedef case. Checking with the p4c compiler, it currently allowsstring
to be aliased, e.g.,typedef string string_t;
typechecks.