Build Options for Compatibility with Old C++ Compilers

VisualAge C++ supports the C++ standard. The standard introduces several important differences from coding C++ practices that were in common use before the C++ standard was finalized. As a result, code that was accepted by earlier versions of VisualAge C++ and predecessor products, and other compilers, may fail to compile due to syntax and semantic incompatibilities.

You may be able to use code that was written for earlier versions of VisualAge C++, if you set build options. These options let your code break some of the new standard rules and use earlier versions of iostream and other classes that have been redefined by the standard or belong to the Standard Template Library (STL).

The table below lists the options you should use to compile C++ coded to two different language levels recognized by previous versions of VisualAge C++ and predecessor products. The left column supports the effective industry standard that was based on early drafts of the ANSI C++ working paper.

Build with the option settings in the right column if your code compiled with the old option /Se on OS/2 and Windows NT platforms. The right column supports many extensions to that version of C++. Build with the option settings in the left column if your code compiled with the old option /Sa. If you did not explicitly set the language level for VisualAge C++ 3.0 or 3.5, CSet++ 2.0 or 2.1, and IBM C and C++ Compilers 3.6, use the right column because /Se was the default setting. You can omit options if your code does not use the language feature they relate to. For example, you do not need to set lang(nokeyword, "bool") unless your code uses the keyword bool as an identifier.

Previous Industry Standard C++ Extended C++ Level
gen(mangleLinkageKeywordOnlyFuncs,no)
lang(allowTypedefAsClassname, yes)
lang(anonymousStructs,no)
lang(compatMath, yes)
lang(longLong, no)
lang(noKeyword,"bool")
lang(noKeyword,"const_cast")
lang(noKeyword,"explicit")
lang(noKeyword,"export")
lang(noKeyword,"false")
lang(noKeyword,"mutable")
lang(noKeyword,"namespace")
lang(noKeyword,"reinterpret_cast")
lang(noKeyword,"static_cast")
lang(noKeyword,"true")
lang(noKeyword,"typename")
lang(noKeyword,"using")
lang(staticConstLinkage)
lang(templateDefImpls,dontParse)
lang(trailingEnumCommas,no)
lang(universalCharacterNames, no)
lang(zeroExtentArrays,no)
link(ansiExtensionsLibrary,no)
link(nameMangling, compat, size)
macros(redefine,no)
gen(mangleLinkageKeywordOnlyFuncs, no)
lang(allowTypedefAsClassname, yes)
lang(ansiForStatementScopes,no)
lang(compatMath, yes)
lang(noKeyword,"bool")
lang(noKeyword,"const_cast")
lang(noKeyword,"explicit")
lang(noKeyword,"export")
lang(noKeyword,"false")
lang(noKeyword,"mutable")
lang(noKeyword,"namespace")
lang(noKeyword,"reinterpret_cast")
lang(noKeyword,"static_cast")
lang(noKeyword,"true")
lang(noKeyword,"typename")
lang(noKeyword,"using")
lang(oldDigraphs,no)
lang(templateDefImpls,dontParse)
lang(universalCharacterNames, no)
link(nameMangling, compat, size)
macros(redefine,yes)


Incremental C++ Builds
Configuration Files


Set Build Options
Build


Build Options
Build Options for Compliance With the C++ Standard
Compile Options from Earlier Versions of VisualAge C++
Compile Options from Earlier Versions of VisualAge C++
Link Options from Earlier Versions of VisualAge C++
Link Options from Earlier Versions of VisualAge C++