Menu

#68 Number of AO compiler assertion does not work

QPN
wont-fix
None
9
2024-08-01
2013-09-13
Anonymous
No

I discover that in qfn.h l 388 we have
extern QActiveCB const Q_ROM Q_ROM_VAR QF_active[QF_MAX_ACTIVE + 1];
it shall be replaced by
extern QActiveCB const Q_ROM Q_ROM_VAR QF_active[];

to allow a working assetion in main file
Q_ASSERT_COMPILE(QF_MAX_ACTIVE == Q_DIM(QF_active) - 1);

Discussion

  • Quantum Leaps

    Quantum Leaps - 2013-09-13

    The compile-time assertion seems correct to me. The macro Q_DIM(QF_active) should return (QF_MAX_ACTIVE+1). So, if the QF_active[] array is initialized correctly, we have an identity: QF_MAX_ACTIVE == (QF_MAX_ACTIVE+1)-1; But if QF_active[] has too many or too few entries, the compile-time assertion will catch it.

    Please explain where you see the problem.

    --MMS

     
  • Quantum Leaps

    Quantum Leaps - 2019-10-24
    • status: open --> wont-fix
     
  • Quantum Leaps

    Quantum Leaps - 2019-10-24

    The bug was closed as not-reproducible.
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel