0-1-2 Infeasible paths clarification

Moderators: david ward, misra cpp

Post Reply
Posts: 2
Joined: Wed Feb 26, 2014 3:55 pm
Company: Invensys/Schneider

0-1-2 Infeasible paths clarification

Post by melinda.bradury » Thu Mar 06, 2014 10:56 am

I have a pure virtual function like
virtual void OnEvent(EventName event, State& superState) = 0;

For some of the derived classes, the implementation uses both of the the parameters. For others, the parameters are not used at all.

Is this acceptable?

misra cpp
Posts: 157
Joined: Mon Jun 02, 2008 1:55 pm
Company: MISRA

Re: 0-1-2 Infeasible paths clarification

Post by misra cpp » Mon Oct 05, 2015 2:33 pm

We assume you meant to refer to 0-1-12 in your title?

If that is the case, then the usage you describe is compliant.
Posted by and on behalf of
the MISRA C++ Working Group

Post Reply

Return to “6.0 Language independent issues (C++)”