Menu

#168 Submachine with substates nested deeper than 2 levels generates code that does not compile

QM3
closed
None
1
2018-05-04
2017-05-26
No

The C/C++ code generated by the QM 4.0.1 does not compile if the sub-state machine contains sub-states nested deeper than 2 levels. Specifically, the sub-machine scope is not properly added to those sub-machine states. Example of generated code:

QP::QMState const MyAO::SM_PreReusable::sub_C2_c = {
    &MyAO::sub_A2_s, // superstate  <============== compilation error
    Q_STATE_CAST(&MyAO::SM_PreReusable::sub_C2),
    ~ ~ ~
};

The correct code should look like that:

QP::QMState const MyAO::SM_PreReusable::sub_C2_c = {
    &MyAO::SM_PreReusable::sub_A2_s, // superstate
    Q_STATE_CAST(&MyAO::SM_PreReusable::sub_C2),
    ~ ~ ~
};

Discussion

  • Quantum Leaps

    Quantum Leaps - 2017-11-15
    • status: open --> closed
     
  • Quantum Leaps

    Quantum Leaps - 2017-11-15

    This bug has been fixed in QM 4.0.3.
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel