Skip to main content

Software > Software Development > C and C++ Compilers >

XL C/C++

Features and benefits

IBM XL C/C++ is available in versions to support the AIX®, Linux®, and z/OS® operating systems, and is the successor to IBM's VisualAge® C++ compiler.

XL C/C++ is part of a family of IBM compilers that support C and C++ programming on IBM's BladeCenter JS20 and JS21, System p™, System i™, and System z™ platforms in addition to other third party platforms. Supported operating systems include AIX, Linux, z/OS, z/VM®, and i5/OS.

XL C/C++ for Multicore Acceleration for Linux, V9.0 is the newest addition to the XL family of compilers. Announced October 2007, XL C/C++ for Multicore Acceleration for Linux is a cross-compiler that fully exploits Cell Broadband Engine Architecture. Cell Broadband Architecture is an innovative and powerful microprocessor architecture that extends 64-bit Power Architecture technology. 

The code base for all of these C and C++ compilers is the same, making source-level portability of your applications between IBM platforms easier than ever before. Our compilers also adhere to international standards and industry specifications, making it easier for you to port your applications to IBM platforms from other non-IBM platforms.

Compiler features vary slightly by operating system platform, and platform-specific features are described in the corresponding platform-specific features pages. However, all versions of XL C/C++ share the common features described below.

Key features of all IBM XL C/C++ compilers include:

 
Conformance to industry language Standards
Compiler optimizations
Support for GNU C/C++ Extensions
Optimizations exploiting the PowerPC processors
Ease of porting
Support for vector instructions
Comprehensive help system


 

Back to top

Conformance to industry language standards
The C and the C++ compilers conform to the latest ISO/IEC International Standards. The C compiler supports the latest ISO C 1999 (International Standard ISO/IEC 9899:1999) standard, also known as C99. The C99 standard offers a number of additional language functions to promote portability of C programs, including:

  • Data types long long and _Bool
  • _Pragma operator
  • Designated initialization
  • Function-like macros with empty arguments
  • Function-like macros with a variable number of args
  • inline function specifier
  • Complex data types and library functions

The C++ compiler supports the latest revised ISO C++ 2003 standard (ISO/IEC 14882:2003), as well as a subset of the C99 language functionality.

The -qlanglvl compiler option is enhanced to support all of the available language levels that you can use to compile your code. These include the strict conformance to the latest C99 and C++ 1998 standards, extended conformance to C99, conformance to the previous C89 standard, and enabling of C89 and C++ with the universal character set. XL C/C++ offers you the flexibility to compile your code to the language level that you need.

Support for GNU C/C++ Extensions
GCC is an open-source compiler collection for C, C++, Fortran, and other languages. In order to help with porting of code that was originally written for GCC, a subset of features related to GNU C and GNU C/C++ is supported by XL C/C++. Other GNU compiler features are recognized (accepted and ignored).  This helps minimize the number of changes needed to let your application compile successfully with XL C/C++.

Ease of porting
XL C/C++ include features that help you port existing code from AIX or other UNIX-based systems, as well as from code originally written for GNU C/C++. For example, by compiling with the -qinfo=por option, you can filter the diagnostic messages emitted by the compiler to show only those that pertain to portability issues. XL C/C++ also includes the gxlc and gxlc++ utilities, which map many GNU compiler options to their XL C/C++ counterparts.  These utilities help minimize the number of changes you need to make when moving existing Makefiles from a GNU development environment to an XL C/C++ development environment.

Back to top

Compiler optimizations
XL C/C++ features IBM's best compiler optimization technology. Compiler options, directives, and pragmas offer programmers a number of ways to optimize their code. By using the -O2, -O3, -O4, and -O5 options, you can obtain optimization levels that run from comprehensive low-level optimizations to more extensive optimizations that include loop optimization and automatic machine tuning. Other options for optimization include:

  • -qarch, -qtune, and -qcache that allow you to optimize your application to the specific processor architectures supported by the version of the compiler you are using.
  • -qhot allows for high-order transformations, which are optimizations that specifically improve performance of loops through techniques such as interchange, fusion, and unrolling.  

Optimizations exploiting PowerPC processor architectures
XL C/C++ can optimize code to take advantage of PowerPC technology found in the BladeCenter JS20 and JS21, Blue Gene, System p, and System i platforms from IBM. The -qarch and -qtune suboptions let you instruct the compiler to generate code optimized for your chosen target processor or processor family. XL C/C++ also supports a number of special built-in functions designed specifically to exploit select PowerPC processor architectures.

Support for vector processing instructions
The compiler supports vector processing (VMX) instruction sets, including support for the Altivec programming model and APIs, on VMX-capable systems.  You can take advantage of VMX instructions and automatic SIMD vectorization to improve program performance in high-bandwidth data processing and algorithmic-intensive applications.

Comprehensive Help System
Help is available online in HTML format, and is optimized for fast access to information on every component in XL C/C++. Most information is also provided in Adobe® PDF format.

Also, text-based man page help is available directly from your command line. This help gives you a quick reference for the format and argument description for all compiler options.

Back to top
We're here to help
Easy ways to get the answers you need.
E-mail us

or call us at
877-426-3774
Priority code:
104CBW67


Technical details

Announcing XL C/C++ for AIX, V9.0

Announcing XL C/C++ for Linux, V9.0

Cell Broadband Engine resource center

Introduction to the Cell multiprocessor


Trials and demos

Try XL C/C++ for 60 days at no charge!


Upgrades/Migrations

Latest XL C/C++ Updates (PTFs)


Industry standards

ISO C Working Group

ISO C++ Working Group

OpenMP Specifications


Product bundles

XL C/C++ for Linux, V9.0 Runtime Environment


Further reading

Mathematical Acceleration Subsystem (MASS)

Develop fast, reliable code with Rational PurifyPlus

Get Adobe® Reader®