p4c icon indicating copy to clipboard operation
p4c copied to clipboard

Typedef annotations is not generated correctly

Open komaljai opened this issue 5 months ago • 5 comments

@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)

komaljai avatar Sep 16 '24 05:09 komaljai