28-07-2010, 06:03 PM
Are references to bools permitted under requirement #5-3-1?
Welcome to the new MISRA discussion forum, if you were previously a member of our forums you may need to reset your password.
Rule 5-3-1 and bool & ...
|
28-07-2010, 06:03 PM
Are references to bools permitted under requirement #5-3-1?
15-05-2016, 06:01 AM
I think that references to bools are permitted under this requirement.
Maybe the treatment of references should be clarified in section 6.5.0 (Expressions / General). - I think that this should be clear from reading the Rationale section. - Essentially, reference is not really a type, but an alias. If this is not permitted, then I don't see how one can use references under MISRA (at least not for basic types: bool / int / double etc.). - This is the same way that (*pBoolVar) is considered bool. - Also the RTTI's typeid() for references, returns bool. Since I am having an argument with the vendor of the static-analysis tool, I would appriciate if someone could clarify this.
<t></t>
11-10-2016, 09:49 AM
The intention is that a “reference to bool†type is also permitted
Posted by and on behalf of
the MISRA C++ Working Group |
« Next Oldest | Next Newest »
|