MISRA Discussion Forums
Why is rule 1.2 classified as undecidable? - 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.1 A standard C environment (https://forum.misra.org.uk/forumdisplay.php?fid=156)
+---- Thread: Why is rule 1.2 classified as undecidable? (/showthread.php?tid=1438)



Why is rule 1.2 classified as undecidable? - dg1980 - 13-07-2018

All you have to do is check the syntax/keywords against the C language standard?
It is even possible with some compilers (e.g. a strict mode)?


Re: Why is rule 1.2 classified as undecidable? - misra-c - 04-10-2018

Language extensions may cover more than just extra syntax or keywords. It's legal for an extension to provide a well-defined behaviour for something that is undefined in The Standard. Since detecting some of the undefined behaviours is undecidable it's not possible to decide whether a program is making use of the extension.