MISRA switch staement - 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.16 Switch statements (https://forum.misra.org.uk/forumdisplay.php?fid=171) +---- Thread: MISRA switch staement (/showthread.php?tid=1382) |
MISRA switch staement - Hanumanthappa E - 18-10-2017 Hi everyone, Can anyone give an example of MISRA-C "switch" statement pls.... Re: MISRA switch staement - dg1980 - 18-10-2017 I assume you mean fully compliant, right? Code: switch (i)/* essentially integer (for bool use if/else), needs at least two clauses*/ Re: MISRA switch staement - misra-c - 13-11-2017 An example of a compliant switch statement is: Code: typedef signed char int8_t; |