* * IBM(R) * IBM XL C/C++ Advanced Edition Version 6.0 for Mac OS X * 5724-G12 * * Licensed Materials - Property of IBM * (C) Copyright IBM Corp. 2005. All Rights Reserved. * * IBM is trademark or registered trademark of International Business * Machines Corporation in the U.S., other countries or both. * * US Government Users Restricted Rights - Use, duplication or disclosure * restricted by GSA ADP Schedule Contract with IBM Corp. * *** IBM XL C/C++ Advanced Edition Version 6.0 for Mac OS X *** This README file contains updated information about IBM XL C/C++ Advanced Edition Version 6.0 that is not available in our online help. For a database of known problems, solutions, and frequently asked questions (Technotes) on Mac OS X and other platforms, see: http://www.ibm.com/software/awdtools/vacpp/support/ The instructions in this file assume that you are using the default installation locations (paths that begin with "/opt"). If you are using non-default locations, specify the appropriate relocation path before "/opt". In addition to the XL C/C++ compiler for Mac OS X, IBM also produces the XL Fortran compiler for Mac OS X. For more information, see: http://www.ibm.com/software/awdtools/fortran By using IBM XL C/C++ Advanced Edition Version 6.0 for Mac OS X, you agree to the terms of the license as specified in the following files: - license.pdf - LicenseAgreement.pdf These files are located in the root directory of the installation CD or disk image. After installation, they are located in the following directory: /opt/ibmcmp/vacpp/6.0 The SMP run-time environment (packages xlsmp.msg.rte.pkg and xlsmp.rte.pkg) is a Technology Preview and is not for redistribution. README Content ============== This document contains the following sections: I. Operating System Support II. Installation Instructions III. Technology Preview IV. June 2005 and Future XL C/C++ Advanced Edition Version 6.0 for Mac OS X Updates V. September 2004 XL C/C++ Advanced Edition Version 6.0 for Mac OS X Update VI. June 2004 XL C/C++ Advanced Edition Version 6.0 for Mac OS X Update VII. March 2004 XL C/C++ Advanced Edition Version 6.0 for Mac OS X Update VIII. Updates to the Product Documentation I. Operating System Support =========================== IBM XL C/C++ Advanced Edition Version 6.0 supports Mac OS X versions 10.2 and 10.3. II. Installation Instructions ============================= You must uninstall any XL C/C++ evaluation compilers before installing this update. For complete installation instructions, see the Getting Started manual. A PDF file is located at /doc/en_US/pdf/getstart.pdf on the installation CD or disk image. xlc++ Run-Time Shared Object ---------------------------- The vacpp.rte.pkg package can be redistributed with your application. This package contains the xlc++ run-time shared object and is located in the /runtime directory of the CD or disk image. For information about redistributing this package, see the license agreement. III. Technology Preview ======================= The following is provided as part of the Technology Preview: - OpenMP C/C++ API V1.0 - Objective-C These features are not part of the IBM XL C/C++ compiler product. The purpose of the technology preview is to showcase early results of development work. There is no support for these features. For information about the Technology Preview, see: /doc/en_US/pdf/techpreview.pdf on the installation CD or disk image. IV. June 2005 and Future XL C/C++ Advanced Edition Version 6.0 for Mac OS X Updates ============================================================== Viewing Documentation Using the Apple Help Center ------------------------------------------------- Mac OS X 10.2 ------------- To display the HTML version of the documentation use the following steps: a) From the Finder application menu, click Help. b) Select Mac Help. c) Click on Help Center on the button bar. d) Select IBM XL C/C++ from the drawer. Mac OS 10.3 ----------- To display the HTML version of the documentation use the following steps: a) From the Finder application menu, click Help. b) Select Mac Help. c) From the Help Viewer application menu, click Library. d) Select IBM XL C/C++ Compiler. COMPILER OPTIONS ---------------- -O0 Option ---------- You can specify the -O0 option as a synonym for -qnooptimize. Specifying -O0 disables almost all optimizations. -qfloat Option -------------- Syntax: -qfloat=[no]hsflt The -qfloat option speeds up calculations by truncating instead of rounding computed values to single precision before storing and on conversions from floating point to integer. In the XL C/C++ Advanced Edition Version 6.0 for Mac OS X the -qfloat option has now the following additional suboptions: hsflt and nohsflt, -qfloat=hsflt and -qfloat=nohsflt. The default is -qfloat=nohsflt. The nohsflt suboption specifies that single-precision expressions are rounded after expression evaluation and that floating-point-to-integer conversions are to be checked for out-of-range values. The hsflt suboption overrides the rndsngl, nans, and spnans suboptions. Note: The hsflt suboption is for specific applications in which floating-point computations have known characteristics. Using this option when you are compiling other application programs can produce incorrect results without warning. The -qfloat=hsflt option replaces the obsolete -qhsflt option. Use -qfloat=hsflt in your new applications. Documentation Errata -------------------- Please note that all errata have been included in the February 2005 Update documentation. Compiler Reference Errata ------------------------- #pragma ibm snapshot Directive ------------------------------ In the #pragma ibm snapshot section, the following text: #pragma ibm snapshot directive sets a debugging breakpoint at the point of the pragma, and defines a list of variables to examine when program execution reaches that point. now reads The #pragma ibm snapshot allows the user to set a breakpoint at the location of the pragma, and defines a list of variables to examine when program execution reaches the breakpoint. The following is an added consideration for users of the snapshot pragma: At high optimization levels, snapshot does not consistently preserve the contents of variables with a static storage class. rwvftable Option ---------------- Please disregard the rwvftable option in all documentation as currently this option is not supported in the XL C/C++ Advanced Edition Version 6.0 for Mac OS X. Further Updates --------------- Additional information and documentation errata for the June 2005 IBM XL C/C++ Advanced Edition Version 6.0 for Mac OS X Update and all future IBM XL C/C++ Advanced Edition Version 6.0 for Mac OS X Updates can be found at the following url: http://www.ibm.com/support/docview.wss?uid=swg21205571 V. September 2004 XL C/C++ Advanced Edition Version 6.0 for Mac OS X Update =========================================================== Compiler Reference Errata ------------------------- The following corrections apply to the IBM XL C/C++ Advanced Edition Version 6.0 for Mac OS X Compiler Reference: -qdollar Option --------------- When -qdollar is in effect, the compiler treats occurrences of $ in an identifier in the same manner as a base character. If -qnodollar is in effect but -qlanglvl=ucs is on, occurrences of $ are treated as an extended character and translated into \u0024. -qinline Option --------------- The valid suboptions and syntax for this command are as follows: * -qnoinline (C and C++) * -qinline (C and C++) * -qinline=threshold (C only) * -qinline+func1:func2 (C only) * -qinline-func1:func2 (C only) -qinline=limit=n is not a valid suboption. -qstrict_induction Option ------------------------- The default setting of this option for optimization levels 2 and higher is -qnostrict_induction, and -qstrict_induction otherwise. It is not necessary to specify -qnostrict_induction with -O2, as this setting is implied. -qwarn64 Option --------------- Syntax -qwarn64 | -qnowarn64 The -qwarn64 option functions as a preview aid to discover possible 32- to 64-bit migration problems. This option can be used to better prepare your application for future migration to 64-bit. The default setting is -qnowarn64. Informational messages are displayed where data conversion may cause problems in 64-bit compilation mode, such as: - truncation due to explicit or implicit conversion of long types into int types - unexpected results due to explicit or implicit conversion of int types into long types - invalid memory references due to explicit conversion by cast operations of pointer types into int types - invalid memory references due to explicit conversion by cast operations of int types into pointer types - problems due to explicit or implicit conversion of constants into long types - problems due to explicit or implicit conversion by cast operations of constants into pointer types -O Option ------------ At -O2, -qnostrict_induction is implied by default. To turn off effects of -O2 that might change the semantics of a program, specify -qstrict_induction. #pragma unroll Option --------------------- If you do not specify a loop unrolling factor and if you specify -O2 or higher, the optimizer determines an appropriate unrolling factor for each nested loop. VI. June 2004 XL C/C++ Advanced Edition Version 6.0 for Mac OS X Update ======================================================================= #pragma once ------------ This update contains information about #pragma once #pragma once instructs the compiler that the file in which the pragma resides should be processed only once when compiling the program. This pragma is most commonly used in header files to protect them from being included more than once and it also provides functions similar to the more portable "#ifndef/#endif" wrapper code often found in C and C++ header files. The basic syntax for the #pragma once is: #pragma once This pragma does not take effect until read by the compiler, so it should appear near the top of the file it is protecting. You can also specify additional pragmas with #pragma once. For example: #pragma once chars(signed) Note: the use of this pragma is deprecated. For new applications, you should use the more portable "#ifndef/#endif" wrapper code to guard your header files. For example: #ifndef someMacro #define someMacro header contents #endif VII. March 2004 XL C/C++ Advanced Edition Version 6.0 for Mac OS X Update ===================================================== Xcode 1.1 Support ----------------- This update contains support for Xcode 1.1. If Xcode is already installed when you install XL C/C++, the installation script automatically integrates the C and C++ compilers with Xcode. If you install Xcode after you install XL C/C++, you can execute the following command to integrate the C and C++ compilers with Xcode: /opt/ibmcmp/vacpp/6.0/exe/xlc_ide_plugin_install When you build a project containing both C and C++ source files, the first file in the source list of the target must be a C++ source file. If the first file in your source list is not a C++ file, your build will fail at the link step. Prebind Support --------------- Prebinding an application allows the compiler to determine the addresses of shared library symbols at link time. This can save time when launching an application as the symbol addresses are predetermined. To build a shared library with prebinding enabled, specify the following compiler options: -qmkshrobj -prebind -seg1addr
where:
is the starting address for your shared library. Apple has reserved the 0x00000000 to 0x3FFFFFFF address range for applications. If your address range overlaps the address range used by any other shared library, prebinding is disabled. To prebind an application to shared libraries that have prebinding enabled, specify the following compiler option: -prebind To take advantage of prebinding, recompile existing applications with the -prebind compiler option. If you do not want to use prebinding, you can continue to run your applications without recompiling. IBM compilers use the 0xD4105000 to 0xD4C00000 address range. This is part of the address range that Apple has set aside for third-party products. In the unlikely event that you install another product that has an overlapping address range, prebinding is disabled. #pragma option_override ----------------------- This change applies to C and C++ and now reads as follows: Description The #pragma option_override directive lets you specify alternate optimization options to apply to specific functions. Syntax +-,------------+ V | >>-#--pragma--option_override--(--func_name----"--option--"-+--)->< Corresponding Command Line Settings and Syntax for #pragma Option Setting option_override option ------------------------------------------------------------- -O, -O2, -O3, -O4, -O5 opt(level, number) -qspill=number opt(registerSpillSize, number) -qcompact opt(size[,yes]) -qnocompact opt(size,no) -qstrict opt(strict) -qnostrict opt(strict,no) Example #pragma option_override (func_name, "opt(registerSpillSize,512)") VIII. Updates to the Product Documentation ========================================== Alignment Size Limit -------------------- According to the XL C/C++ Language Reference, the alignment size specified on the __align keyword can be 1, 2, 4, 8, or 16. The alignment size must be a positive power of 2, but the upper limit is not 16. File scope extern, file scope static and local static variables whose alignment is modified by direct or indirect application of the __align specifier or the aligned variable attribute may be capped at a platform-dependent limit. On Mac OS X, this limit is 4096. Shared Objects with IPA ----------------------- If you use shared objects together with IPA (compiler option -qipa or optimization level 4 or 5), you may have the following problem. IPA uses the install name of a shared library to determine the library's dependents, and recursively opens and reads all dependent libraries. If it can't find a library, it emits an error. To avoid this, ensure that all shared libraries have a fully-qualified install name and that they can be found at the location specified by the install name. When you build a shared library, specify the fully-qualified name on the -o option. When you link the shared library, specify the path on the -L option. For example: xlc++ -qmkshrobj foo.C -o /User/name/product/libfoo.dylib xlc++ -O4 app.C -L/User/name/product -lfoo If you need to change a shared object's install name after you build the application, you can use install_name_tool. For more information, see the install_name_tool man page. gcc Problem Produces Null Pointer Error Message ----------------------------------------------- When compiling C++ files, you may receive the following message: 1540-0219 (S) The call to "__is_null_pointer" has no best match This problem will be fixed in a future release of gcc. As a temporary patch, you can edit the following file: /usr/include/gcc/darwin/3.3/c++/bits/basic_string.tcc and change line 56 from: __is_null_pointer(const _Type&) to: __is_null_pointer(const _Type) Uninstallation Instructions --------------------------- To uninstall XL C/C++ (except for the SMP and C++ run-time libraries), issue the following commands. These commands assume that you have installed XL C/C++ in the default location. /bin/rm -rf /Library/Receipts/vac.*.pkg /bin/rm -rf /Library/Receipts/vacpp.cmp.pkg /bin/rm -rf /Library/Receipts/vacpp.help.pkg (optional package) /bin/rm -rf /Library/Receipts/vacpp.samples.pkg (optional package) /bin/rm -f /etc/opt/ibmcmp/vac/6.0/vac.cfg /bin/rm -f /etc/opt/ibmcmp/vac/6.0/gxlc.cfg /bin/rm -f /opt/ibmcmp/vac/6.0/lib/libxlcmp*.dylib /opt/ibmcmp/vacpp/6.0/exe/xlc_ide_plugin_uninstall /bin/rm -rf relocation/opt/ibmcmp/vac/6.0/samples /bin/rm -rf relocation/opt/ibmcmp/vac /bin/rm -rf relocation/opt/ibmcmp/vacpp/6.0/samples /bin/rm -rf relocation/opt/ibmcmp/vacpp/6.0/doc /bin/rm -rf relocation/opt/ibmcmp/vacpp/6.0/man /bin/rm -rf relocation/opt/ibmcmp/vacpp /bin/rm -f /Library/Documentation/Help/ibmxlcpp If you no longer need the SMP libraries, which are used by both XL Fortran and XL C/C++, delete them as follows. Do not delete these libraries if you have XL Fortran installed on your system or if you have any Fortran, C, or C++ applications that link to these libraries. /bin/rm -rf /Library/Receipts/xlsmp.*.pkg /bin/rm -f /opt/ibmcmp/lib/libxlomp_ser.*.dylib /bin/rm -f /opt/ibmcmp/lib/libxlsmp.*.dylib /bin/rm -f /opt/ibmcmp/msg/en_US/smprt.cat /bin/rm -rf /opt/ibmcmp/xlsmp If you do not have any C++ applications that require the C++ run-time shared object, delete it as follows: /bin/rm -rf /Library/Receipts/vacpp.rte.pkg /bin/rm -f /opt/ibmcmp/lib/libibmc++.*.dylib