MISRA Discussion Forums
Rule 2.4 and tag used in typedef - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4)
+--- Forum: MISRA C:2012 and MISRA C:2023 guidelines (https://forum.misra.org.uk/forumdisplay.php?fid=21)
+---- Forum: 8.2 Unused code (https://forum.misra.org.uk/forumdisplay.php?fid=157)
+---- Thread: Rule 2.4 and tag used in typedef (/showthread.php?tid=1210)



Rule 2.4 and tag used in typedef - lovewar - 30-10-2015

Would the following examples be compliant with rule #2.4?
Code:
typedef struct cood cood_t;
struct cood {                    // here,  is the tag "cood" compliant?
    uint8_t  id;
};



Re: Rule 2.4 and tag used in typedef - michael.metivier - 14-11-2015

This appears to be nearly identical to my question in http://www.misra.org.uk/forum/viewtopic.php?f=216&t=1482, and the answer was yes.


Re: Rule 2.4 and tag used in typedef - misra-c - 18-11-2015

The above code is compliant with rule 2.4.