Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 3-1-1 and constant declarations
#3
The ODR does not apply to const declarations as they have internal linkage, not external (the definition of the ODR explicitly says it only applies to objects with external linkage). So the examples quoted are compliant.

The first paragraph of the rationale will be replace with the following in "MISRA C++:2008 Technical Corrigendum 1":

"It shall be possible to include a header file into multiple translation units without violating the One Definition Rule. See section 6.3.2 for an explanation of the ODR."
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)