Skip to content

Commit 5b80553

Browse files
committed
make array/tuple/list combos errors.
Comment that these combos do not appear useful, but don't seem hazardous either, so could be added in the future.
1 parent 4517daf commit 5b80553

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

p4-16/spec/P4-16-spec.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2583,17 +2583,17 @@ arbitrary-precision integer, without a width specified.
25832583

25842584
| `header types` | error | allowed | allowed | allowed | NA [3] | allowed
25852585

2586-
| `array types` [4] | allowed | error | allowed | error? | allowed [5] | error
2586+
| `array types` [4] | allowed | error | allowed | error [7] | allowed [5] | error
25872587

25882588
| `header stacks` | error | error | allowed | allowed | error | error
25892589

25902590
| `header_unions` | error | error | allowed | allowed | NA [3] | allowed
25912591

25922592
| `struct types` | allowed [2] | error | allowed | allowed | allowed | error
25932593

2594-
| `tuple types` | error | error | allowed | allowed | error? | error
2594+
| `tuple types` | error | error | allowed | allowed | error [7] | error
25952595

2596-
| `list types` | error | error | error | allowed | error? | error
2596+
| `list types` | error | error | error | allowed | error [7] | error
25972597

25982598
| `extern instances` | error | error | error | erroe | allowed [6] | error
25992599

@@ -2623,6 +2623,9 @@ type is not a header or header_union.)
26232623

26242624
[6] Architectures may disallow arrays of extern instances.
26252625

2626+
[7] Currently these are disallowed because there doesn't seem to be any use case for
2627+
them, but there do not appear to be any particular pitfalls to allowing them.
2628+
26262629
Rationale: `int` does not have precise storage requirements,
26272630
unlike `bit<>` or `int<>` types. `match_kind`
26282631
values are not useful to store in a variable, as they

0 commit comments

Comments
 (0)