Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule about extern "C" and missing exceptions
#2
extern "C" only affects linkage, and MISRA C++:2023 rules do not place any limits on their contents.

The intention of 6.0.3 is to allows extern "C" to be used at global scope so that use can be made to declarations/definitions in headers from other  C-compatible languages. There is an expectation that they will not be used to add objects at global scope that would otherwise be disallowed by 6.0.3.

The wording of this rule is under review for a future version, to see if it needs to be more explicit what is allowed in an extern "C" block.
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread
RE: Rule about extern "C" and missing exceptions - by misra cpp - 08-05-2026, 01:37 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)