MISRA-C:2012 is the automotive industry's coding standard for C — ~140 numbered rules + ~17 directives covering type safety, control flow, identifiers, pointers, and language-feature restrictions. It is the most widely-cited "credibility currency" in safety-critical embedded software: when a tool says "we map our checks to MISRA-C Rule 17.2 / 15.7 / 5.3", a safety auditor reading a tool report has a familiar reference frame.
plc-st-review is not a C linter — it analyses IEC 61131-3 Structured Text, a different language. But many of MISRA-C's rules express the same underlying intent (no recursion, no goto, no implicit conversions, no unused parameters, no shadowing, …), so plc-st-review checks that enforce that intent in ST can be honestly mapped to the equivalent MISRA-C rule. The mapping below is intent-based, not byte-equivalent: it is a credibility signal, not a certification claim.
It is a one-way reference: "if you live in a MISRA-C-aware codebase, here's how each plc-st-review check corresponds to the MISRA-C rule that addresses the same intent."
It is not a claim that running plc-st-review makes your ST code MISRA-C compliant — the standards target different languages.
It is not a certified mapping — there is no MISRA equivalent for IEC 61131-3, and no notified body audits "MISRA-aligned" tool claims.
Many of plc-st-review's checks (timer / counter / FB-instance / diff-based / project-metric categories) cover PLC-domain concerns C doesn't have and have no MISRA-C analogue. Those are listed under "No direct equivalent" — that's expected, not a gap.
Rule numbers reference MISRA-C:2012 (the current edition at time of writing). MISRA-C:2023 mostly renumbers and adds; the intent-level mapping is stable.
Rule 10.1 (operands shall have an appropriate essential type) / Rule 10.3 (no implicit conversion of essential type)
Mixing an INT and a REAL in arithmetic without an explicit conversion hides a precision-loss bug.
BOOL_COMPARISON
Rule 14.4 (controlling expression of an if shall have essentially Boolean type)
IF xButton = TRUE is a category error: xButton is already a Boolean.
REAL_EQUALITY
Dir 4.1 (run-time failures shall be minimized)
Floating-point equality is brittle by definition; use a tolerance. (MISRA-C 2012 doesn't have a numbered rule against == on float, but it is universally cited as a Dir 4.1 hazard.)
DIVISION_BY_ZERO
Dir 4.1 (run-time failures)
A literal / 0 (or a constant resolving to zero) is undefined behaviour at runtime.
ARRAY_INDEX_OUT_OF_BOUNDS
Rule 18.1 (pointer arithmetic shall not exceed bounds of object)
A literal index outside declared bounds is a static out-of-bounds access.
These categories cover concerns that don't exist in C and have no MISRA-C analogue. They are not a gap in this mapping — they're the part of plc-st-review that makes it useful for ST in the first place.
Timer / counter / edge / bistable patterns (TIMER_PT_ZERO, TIMER_NOT_DRIVEN, TIMER_VALUE_CHANGED, COUNTER_PV_ZERO, COUNTER_VALUE_CHANGED, EDGE_TRIG_REUSED, BISTABLE_DOMINANCE_MISMATCH) — IEC 61131-3 standard function blocks; C has nothing equivalent.
FB-instance integrity (FB_INSTANCE_DOUBLE_CALL, FB_INSTANCE_NEVER_CALLED) — IEC FB-instance semantics; C has no stateful function-like construct.
Diff-based PR checks (SIGNATURE_CHANGED, CALL_SITE_OUTDATED, TYPE_MISMATCH, ENUM_VALUE_REMOVED, ENUM_VALUE_ADDED, CONSTANT_VALUE_CHANGED, COMMENT_ONLY, ARRAY_BOUNDS_CHANGED, LOOP_BOUNDS_CHANGED, POU_DELETED, POU_RENAMED, METHOD_ADDED_TO_INTERFACE, INHERITANCE_CHANGED, PRAGMA_CHANGED, COUNTER_VALUE_CHANGED, TIMER_VALUE_CHANGED) — these compare two revisions; MISRA-C is a single-revision rule set.
PLC-specific syntax (DIRECT_ADDRESS_USED for %I0.0/%Q1.2) — C has no equivalent for direct I/O addresses.
Global-write tasking (MULTI_WRITER_GLOBAL, TOO_MANY_GLOBALS_USED, EXTERNAL_VAR_IN_FUNCTION) — IEC's PROGRAM / task model; MISRA-C addresses concurrency only through Dir 4.x guidelines, no per-rule analogue.
Metric regressions (COMPLEXITY_INCREASED, NESTING_INCREASED, LOC_SPIKE, DEAD_POU_INTRODUCED) — MISRA-C is advisory on complexity (Dir 4.x) but defines no specific metric thresholds.
Bare-config rules (FORBIDDEN_SYMBOL, NAMING_CONVENTION) — team policy, not coded by MISRA.
Mapped to a MISRA-C Directive (looser, intent-only)
~5
PLC-domain — no MISRA-C equivalent
~45
If you're using plc-st-review on a project that also runs C code through a MISRA-C linter, this table is the bridge: the same intent shows up under both standards in their respective languages.