How do explicit casts of arguments affect 21.15 (amendment 1)? - 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.21 Standard libraries (https://forum.misra.org.uk/forumdisplay.php?fid=176) +---- Thread: How do explicit casts of arguments affect 21.15 (amendment 1)? (/showthread.php?tid=1415) |
How do explicit casts of arguments affect 21.15 (amendment 1)? - abgs - 09-04-2018 When rule 21.15 of MISRA C 2012 Amendment 1 refers to the types that pointer arguments are pointers to, how are explicit casts interpreted? Are the types that they are pointers to considered before or after the cast? Code: void f(signed char* a, int* b, size_t n) { Re: How do explicit casts of arguments affect 21.15 (amendment 1)? - misra-c - 24-04-2018 Rule 21.15 applies to the types after casting. Code: void f(signed char* a, int* b, size_t n) { |