Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 8-4-4 Exception for stream manipulators?
#1
Hi,

Does Rule 8-4-4 imply that we have to write code like this? I do not see any exception for stream manipulators. Our static analyzer is flagging this case.

Code:
std::cout << "Hello World" << &std::endl;
                              ^
Reply
#2
It appears this has been addressed here:

https://forum.misra.org.uk/showthread.ph...49#pid2749

Admins, consider editing the title of that thread to remove the erroneous characters, since it's very hard to see it relates to rule 8-4-4.
Reply
#3
As you say, https://forum.misra.org.uk/showthread.ph...49#pid2749 clarifies the intent of the rule with respect to MISRA C++:2008

It's worth noting that the equivalent rule in MISRA C++:2023, 7.11.3, allows the use of std::endl etc.
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)