IBM Support

Adding new function causes code to be generated in different order in IBM Rational Rhapsody

Question & Answer


Question

Why does adding a new function in IBM Rational Rhapsody cause the order of the function prototypes to be located later in the code.

Cause

Upgrading Rhapsody from a version prior to version 8.1.0.

Answer

In versions prior to Rhapsody 8.1 code generation order had a problem that caused the attribute to mix with other elements. This behavior was a defect and was resolved.

But the backward compatibility property was created, and is intended, to preserve customer code generation; amongst other things. Thus one of the effects of this backward compatibility was to preserve this problematic (defect) code generation.

When we preserved the code generation by using the profile; it set a property that preserved the defect.

This defect occurs only with the property "CPP_CG::Configuration::UsePre81GlobalAttributeLocation that preserves old code generation behavior. The property is overridden in the backward compatibility profile "CGCompatibilityPre81Cpp".

In order to get stable order, remove this property by removing the profile or to override the property on the model; this property is supported at configuration level.

Here is another technote that has some more information on compatibility profiles: http://www.ibm.com/support/docview.wss?uid=swg21430962

It refers to specific versions, but it should be read generically as to how the compatibility settings work, and that you can modify Rhapsody to the point where you do not need the file.

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.1;8.1.1;8.1.2;8.1.2.1;8.1.3;8.1.4;8.1.5","Edition":"Rational Rhapsody Architect for Software;Rational Rhapsody Developer","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21989039