Kyle Cripps
Kyle Cripps
e.g. `--Werror`, `--Wdisable`, etc. See https://github.com/p4lang/p4c/pull/4894 and #4366 for initial test ideas.
``` #include struct S { bit f; } extern bool foo(in bool x, in bool y); control C(inout S s) { action a1() { if (foo(s.f == 0, false)) {...
Cleans up some wording that was missed by #945, which makes it unclear as to whether `switch` statements are actually supported in actions/functions or not. Closes #1362.
Current behavior of the `p4c` compiler is: 1. Report the following error message for backends that _do_ run the `EliminateSwitch` midend pass: ``` error: SwitchStatement: switch statements not supported in...
As mentioned in https://github.com/p4lang/p4-spec/issues/1362, the frontend passes currently produce valid IR for `switch` statements located in actions, but no tests exist to validate that (as all of the backends run...
Building the following P4 program: ``` extern void __e(in bit arg); extern void __e2(in bit arg); control C() { action bar(bool a, bool b) { bit x; bit y; switch...
Reduces the following parser code: ``` state state_1 { transition select(packet.lookahead()) { 0x21 : state_3; 0x21 : state_2; default : accept; } } ``` to: ``` state state_1 { transition...
[#5152] Write preprocessed P4 to `<program_name>.p4pp` file when `--save-temps` option is provided
Closes #5152. Marking as draft until we decide: - What to name the option - I have named it `-P` (for "Preprocessed") for now, but @asl also suggested `--save-temps`. -...
The spec states: > Two header unions can be compared for equality (==) or inequality (!=) if they have the same type. The unions are equal if and only if...