IBM Support

PM23057: Curly braces are generated around initial values of simple literal values, resulting in compiler warnings.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When an initial value is assigned to a Class attribute, and this
    Attribute is of a user-defined Type (unsigned char or other
    simple scalars),  Rhapsody puts curly braces around the initial
    value -
    
    /*## classInstance itsMyClass */
    struct MyClass itsMyClass =
    {        /* itsMyClass */
           {5} /* attribute_0 */
    };
    
    This results in compiler warnings with certain compilers,
    including the one used by the client. Curly braces are not
    necessary since they are not initializing an array in this case.
    This problem only seems to come up when MicroC profile is used.
    No other special environment is necessary.
    
    In addition, setting 'initial value' at the Object level (MicroC
    initial value tab) instead of the Class level, does not generate
    curly braces.  So this is only a problem when a default value is
    provided in a Class.
    
    an example is attached.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Curly braces are generated around initial values of simple
    literal values, resulting in compiler warnings.
    

Problem conclusion

  • Fixed in version 7.5.3.
    Use the C_CG::Type::InitializeAsAtomicType property on the
    Attribute or the Type to notify that braces are not
    required.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM23057

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    752

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-09-22

  • Closed date

    2010-12-18

  • Last modified date

    2010-12-18

  • 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

  • R752 PSN

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
18 December 2010