Why is rule 1.2 classified as undecidable?

Moderators: misra-c, david ward

Post Reply
dg1980
Posts: 109
Joined: Wed Apr 27, 2016 2:33 pm
Company: Elektrobit Automotive GmbH

Why is rule 1.2 classified as undecidable?

Post by dg1980 » Fri Jul 13, 2018 7:31 am

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

misra-c
Posts: 556
Joined: Thu Jan 05, 2006 1:11 pm

Re: Why is rule 1.2 classified as undecidable?

Post by misra-c » Thu Oct 04, 2018 11:18 am

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.
---
Posted by and on behalf of
the MISRA C Working Group

Post Reply

Return to “8.1 A standard C environment”