IBM Support

PI75710: PUBLIC KEYWORD SHOULD BE SUPPRESSED WHEN GENERATING CLASS AS STRUCT

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • If you have a class, and select "Generate Class as struct", the
    class generates with the "public" keyword included. The keyword
    is included before attributes and other objects.
    
    However, when a class is generated as a C struct, everything in
    the class is public. So, there is no need for the "public"
    keyword to be included.
    
    The keyword should be suppressed, or the user should have an
    option to get rid of it easily.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Rhapsody                                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * The  "public/private" keyword in the start of class/struct   *
    * are redundant if the visibility of the first element in the  *
    * class is the the default one                                 *
    * -"private : " for class                                      *
    * -"public : "  for struct  (class with property               *
    * GenClassAsStruct)                                            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • Problem fixed by adding new property
    "CPP_CG::Class::GenDefaultVisibility" that can prevent the
    generation of redundant  keyword {public|private} at the atart
    of {classs|struct}
    the default is the old behavior (generate redundant keyword)
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI75710

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    813

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-01-31

  • Closed date

    2017-06-12

  • Last modified date

    2017-06-12

  • 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

  • R813 PSN

       UP



Document information

More support for: Rational Rhapsody

Software version: 8.1.3

Reference #: PI75710

Modified date: 12 June 2017