This tries to resolve #1285. If merged in the current form, it would also fix #1293 and supercede PR #1294. I tried to make the "categories"/"kinds" of types (like headers and enums) distinct from actual types -- I used for each the name that is used in its section. Furthermore, in the second table (typedef/type rules) I've added the two missing lines for string and for list types. Apparently compiler handles them as would be expected / as I added.
I've also tried to add rationale for the typedef rules. I must say I am not happy with it and I wonder if someone can get a better one. Or we may just allow it (C allows typedefing even void).
Discussed in the P4 LDWG. @vlstill is planning to change the rationale to say roughly "We don't know of any reason to want this so we are conservatively disallowing it."
This tries to resolve #1285. If merged in the current form, it would also fix #1293 and supercede PR #1294. I tried to make the "categories"/"kinds" of types (like headers and enums) distinct from actual types -- I used for each the name that is used in its section. Furthermore, in the second table (
typedef
/type
rules) I've added the two missing lines forstring
and for list types. Apparently compiler handles them as would be expected / as I added.I've also tried to add rationale for the
typedef
rules. I must say I am not happy with it and I wonder if someone can get a better one. Or we may just allow it (C allows typedefing evenvoid
).Fixes #1285.