A fix is available
APAR status
Closed as program error.
Error description
Summary: MISRA rule 10-1-1 not respected by Rhapsody code generator Description: The attachment contains a simple example with an interface (interface_2) that has a reception on event: event_1. In generated code (see file interface_2.h), there is: //## class interface_2 class interface_2 : virtual public OMReactive { ... The MISRA rule 10-1-1 (Advisory) says: ' Classes should not be derived from virtual bases.' This relates also to rule 10-1-2: 'A base class shall only be declared virtual if it is used in a diamond hierarchy.' In the example, we are not in a diamond hierarchy. Diamond hierarchy is: class A {}; class B: public virtual A {}; // Compliant - A is a common base for D class C: public virtual A {}; // Compliant - A is a common base for D class D: public B, C {}; But following line is not a diamond hierarchy: class E: public virtual A {}; // Non-compliant Related Defect: MISRA rule 9-3-2 not respected raised with APAR ID: PM48174 on PMR: 16030,660,706 Attachment: 16025,660,706.zip contains the sample model
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * **************************************************************** * RECOMMENDATION: * **************************************************************** MISRA rule 10-1-1 not respected by Rhapsody code generator - classes are derived from virtual bases.
Problem conclusion
To have the "virtual" keyword removed, you must change the value of the property CPP_CG::Framework::ReactiveBaseAsVirtual to False. This did not work previously but has been fixed in version 7.6.0.1.
Temporary fix
Comments
APAR Information
APAR number
PM48282
Reported component name
TLOGIC RHAPSODY
Reported component ID
5724V74RP
Reported release
760
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-09-20
Closed date
2011-10-21
Last modified date
2011-10-21
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
TLOGIC RHAPSODY
Fixed component ID
5724V74RP
Applicable component levels
R760 PSN
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.6","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Document Information
Modified date:
28 October 2021