What's New in Oracle® Solaris Studio 12.4

Exit Print View

Updated: December 2014

Additional C++ Compiler Changes

The following lists the new and changed features in this release of version 5.13 specific to the C++ compiler. For more information, see the CC (1) man page.

The C++ compiler changes include the changes that are described in New and Changed Features Common to the Compilers.

For details, see the Oracle Solaris Studio 12.4: C++ User’s Guide and the CC man page.

  • Support for –compat=g on all platforms .

  • New compiler option: –std enables selection of either C++ 03 or C++ 11 dialect with g++ binary compatibility. When using –std=c++11, the following limitations apply:

    • Universal Character Names (escaped Unicode characters) are not currently supported.

    • The non-standard iostream headers ending in .h, such as <iostream.h>, <fstream.h>, etc., are not available. These headers were intended to ease the transition from old-style C++ to C++98.

  • New compiler option: –features=[no%]rtti disables runtime type identification (RTTI).

  • New compiler option: –xprevise produces a static analysis of the source code that can be viewed in Code Analyzer.

  • The following options that have -xoption equivalents are now deprecated:

    • –help

    • –inline

    • –libmieee

    • –libmil

    • –nolib

    • –nolibmil

    • –pg

    • –time

    • –unroll

    Instead you should use –xhelp, –xinline, –xlibmieee and so on.

  • Support for –xregs=float on x86.

  • Behavior for –errtags is now the same as for the C compiler, emitting tags only for warning messages. In previous C++ compilers, the –errtags option caused a tag to be printed as part of the message for both warnings and errors.

  • Default –template option changing from –template=extdef to –template=no%extdef.

    This change is because no other compiler uses the definitions separate template model that is assumed by –template=extdef. The –template=extdef option imposes strict requirements on how source code is organized, which most code does not follow. Unless you develop only with Oracle Solaris Studio C++, it is likely that the –template=no%extdef option is needed.

    For more information, see Chapter 6, Creating and Using Templates, in Oracle Solaris Studio 12.4: C++ User’s Guide and Understanding the Effects of the Changed Default C++ Template Compilation Model.

    Note -  The –library=stdcxx4 option does not currently work with –template=no%extdef. Specify –template=extdef when compiling C++ code on the command line if using the –library=stdcxx4 option, until a patch for the library is available.