Skip to content

Commit

Permalink
Update rationale
Browse files Browse the repository at this point in the history
  • Loading branch information
vlstill committed Aug 6, 2024
1 parent ea7c472 commit a1e6086
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions p4-16/spec/P4-16-spec.mdk
Original file line number Diff line number Diff line change
Expand Up @@ -2585,12 +2585,9 @@ The table below lists all types that may appear as base types in a
| a `type` name | allowed | allowed |
|-------------------|--------------------|-----------------|

Rationale: `void` is not useful except for specifying a function or
method that does not return anything, therefore there is no reason in
aliasing it and it could be confusing. `match_kind` values are not
useful to store in a variable, as they are only used to specify how
to match fields in table search keys, which are all declared at
compile time and the declaration does not contain type.
Rationale: So far, no clear motivation for allowing `typedef` for `void`
and `match_kind` was presented. Therefore, to be on the safe side this
is disallowed.

[^type_allowed]: `type B <name>` is allowed for a type name `B`
defined via `typedef X B` if `type X <name>` is allowed.
Expand Down

0 comments on commit a1e6086

Please sign in to comment.