p4c
p4c copied to clipboard
Typedef annotations is not generated correctly
@tc_type("mac") typedef bit<48> macaddr_t;
header ethernet_t {
macaddr_t dstAddr;
macaddr_t srcAddr;
bit<16> etherType;
}
This should translate to
header ethernet_t {
@tc_type("mac") bit<48> dstAddr;
@tc_type("mac") bit<48> srcAddr;
bit<16> etherType;
}
Compiler should copy annotations for 'typedef' (which is not currently supported)