IBM Support

PM45436: Typedef is incorrectly generated when working with variants in Rhapsody


You can track all active APARs for this component.

APAR status

  • Closed as Permanent restriction.

Error description

  • There are various problems when selecting variants using
    Rhapsody 7.6.
    The customer would like to know how to insert a typedef into the
    file 'CVariation.h', which corresponds to the selected variant.
    At the same time they would like to be able to insert the same
    typedef into the file 'CVariationPkg.h' as a Dummy Variable that
    can be generated.
    In the attached sample project, there are four variant classes,
    'CVariant_A' to 'CVariant_D', where A and B are directly in the
    Variation package, and C and D are in a sub-package.
    If the variant B is selected, then the typedef is generated and
    the project works.
    If the variant A is selected, then the generated typedef leads
    to a translation error.
    If C or D is selected, then no forward declaration can be
    selected at all. However this problem can be avoided by creating
    dependencies to insert forward declarations manually.
    The customer would like to know why it is necessary for C and D
    to create these dependencies, and also why the generated typedef
    for A causes a problem.

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * PROBLEM DESCRIPTION:                                         *
    * RECOMMENDATION:                                              *
    Typedef is generated incorrectly when working with variants
    in Rhapsody.

Problem conclusion

  • In this case, the incorrect code generation was due to a
    corrupt source artifact in the model. When the problematic
    file is deleted, the code is generated as expected.

Temporary fix


APAR Information

  • APAR number


  • Reported component name


  • Reported component ID


  • Reported release


  • Status


  • PE




  • Special Attention


  • Submitted date


  • Closed date


  • Last modified date


  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

Applicable component levels

Document information

More support for: Rational Rhapsody

Software version: 7.5.3

Reference #: PM45436

Modified date: 09 January 2012