HCS08 Compiler > Language > CompactC++ features

Use this panel to select compact C++ features of HCS08 compiler.

The following table lists and describes the compactC++ options for HCS08.

Table 1. Tool Settings - HCS08 Compiler > Language > CompactC++ Features Options
Option Description
Disable all compactC++ features (-Cn) If the -C++ option is enabled, you can disable the compactC++ features.
  • Vf : Virtual functions are not allowed.

    Avoid having virtual tables that consume a lot of memory.

  • Tpl : Templates are not allowed.

    Avoid having many generated functions perform similar operations.

  • Ptm : Pointer to member not allowed.

    Avoid having pointer-to-member objects that consume a lot of memory.

  • Mih : Multiple inheritance is not allowed.

    Avoid having complex class hierarchies. Because virtual base classes are logical only when used with multiple inheritance, they are also not allowed.

  • Ctr : The C++ Compiler can generate several kinds of functions, if necessary:

    - Default Constructor

    - Copy Constructor

    - Destructor

    - Assignment operator

    With this option enabled, the Compiler does not create those functions. This is useful when compiling C sources with the C++ Compiler, assuming you do not want C structures to acquire member functions.

  • Cpr : Class parameters and class returns are not allowed.
Avoid overhead with Copy Constructor and Destructor calls when passing parameters, and passing return values of class type.
Do not allow virtual functions (-Cn=Vf) Virtual functions are not allowed. Avoid having virtual tables that consume a lot of memory
Do not allow templates (-Cn=Tpl) Templates are not allowed. Avoid having many generated functions perform similar operations.
Do not allow pointer to member (-Cn=Ptm) Pointer to member not allowed. Avoid having pointer-to-member objects that consume a lot of memory.
Do not allow multiple inheritance and virtual base classes (-Cn=Mih) Multiple inheritance is not allowed. Avoid having complex class hierarchies. Because virtual base classes are logical only when used with multiple inheritance, they are also not allowed.
Do not create compiler defined functions (-Cn=Ctr) The C++ Compiler can generate several kinds of functions, if necessary:
  • Default Constructor
  • Copy Constructor
  • Destructor
  • Assignment operator
With this option enabled, the Compiler does not create those functions. This is useful when compiling C sources with the C++ Compiler, assuming you do not want C structures to acquire member functions.
Do not allow class parameters and class returns (-Cn=Ctr) Class parameters and class returns are not allowed. Avoid overhead with Copy Constructor and Destructor calls when passing parameters, and passing return values of class type.