The usage and advantage of the decltype specifier are introduced in Part I. For details, see
The deduction rules of decltype are introduced in Part II. For details, see
In this section, I will state the inheritance of... [More]
In Part 1 of this C++ Standard September, 2013 meeting trip report, I wanted to mostly go over the core, library issues that affects C++14 and are urgent for the new Standard to emerge. What some people forget is that while this drive for C++14 is happening, there are still some parts of the Committee working on large and small features beyond C++14. This part will describe the many future feature proposals. Many of these proposals may only get full air time during the plenary session and these plenary sessions are getting longer and... [More]
We are pleased to announce the Managed Beta Program for IBM®XL C/C++ for Linux on System z. This Beta Program is separated into two stages, namely, features and compatibility, and, quality and performance.
Clients participating in the Managed Beta program will join developers and product management for education and discussions. Participants will evaluate code and have access to a private website. The beta website will include a tool for reporting problems and feature requests. There will also be a forum for... [More]
Having trouble identifying the correct compiler version installed on your AIX machine? There are a couple of ways such as using the -qversion compiler option or lslpp for the correct compiler filesets.
Feel free to checkout the technote below for more information.
How to determine the installed XL C/C++ for AIX compiler version?
Please let me know if you find this useful.
The IBM XL C and XL C/C++ compilers support the -qalias option. This option indicates whether a program contains certain categories of aliasing or does not conform to C/C++ standard aliasing rules. The -qalias option takes several suboptions, including ansi and typeptr .
When ansi is in effect, type-based aliasing is used during optimization; that is, pointers can only point to an object of the same type. The only exception is that a char* dereference can alias any other types.
typeptr complies to more... [More]
As C++ templates and generic programming become popular, programmers find it sometimes difficult to express the type for a variable or function. People are in urgent need of a mechanism to automatically deduce types for expressions. This new programming mechanism didn't appear until the appearance of decltype. Decltype solves the problem through getting the type or derived type of an expression and acting as the type specifier of another expression whose type needs to be deduced. Here is an example:
In the C++11 standard, the auto keyword is no longer a storage class specifier, but acts as a type specifier that directs the compiler to deduce the type of a declared variable from its initialization expression.
With the auto type deduction feature enabled, you no longer need to specify a type while declaring a variable. Instead, the compiler deduces the type of an auto variable from the type of its initializer expression. For example:
auto i = 1.1; // i : double
You can... [More]
Check out updated exercises in the Power sandbox. You can find them here You can learn about tracking compiler use, performance, auto-vectorization, optimization, interoperability, debugging and reporting.
Those of us who develop C++ applications for a living, often hit a dilemma when analyzing functional errors. Should I debug my application using a symbolic debugger, or should I just add prints and traces to the code to understand its behavior? Too often developers choose the latter, slowing down the application development cycle. Not only must they recompile parts of the application to pick up these changes, but they need to know ahead of time what data to examine, which is often hard to predict in advance. This effectively creates a long... [More]
I've worked out a plan so I can hopefully put a regular post on this blog. My plan is to talk about interesting things the compiler does with templates including lots of examples.
As a compiler developer, I tend to work with small examples that show or test how the compiler is behaving rather than examples that show how you might use a compiler feature in an application. Perhaps some will find this take on things interesting. I have many ideas for topics, but I'm also open to suggestions. One of the things I find interesting is how... [More]
Hi all, I was invited to give two talks on C++0x and Transactional Memory at the newly formed European conference on native C++ at Prien am Chiemsee, near Munich in Germany. http://cpp.adc2011.de/Agenda.aspx Although I was invited to give a talk, I do not know a lot about this conference. However, I know a lot more more about the background after talking with the organizers. It turns out that this is a conference that is split off from another conference which dealt with managed C++. There seems to be a lot of people still with keen interest in... [More]
Great news everybody, The development team for Rational
Developer for Power have been very busy producing videos and demos to
illustrate how to install configure, use projects, edit, navigate
source, validate, build, debug on our supported languages on IBM i, AIX,
and Linux. Check it out. Learning how to effectively use these tools has never been easier. http ://p ubli b.bo ulde r.ib m.co m/in foce nter /ied uass t/rt nv1r 0/in dex. jsp? topi c=/c om.i bm.i ea.r dp/p lugi n_co verp age. html
This is my first post on our C/C++ Cafe that has been long in coming. If you are like me, then you are a new zOS programmer. The learning ride has been quite turbulent and there are ways to go yet. If you are a devoted programmer then you feel quiet excitement of your new program almost working, tempered by the chance of another large manual being 'thrown' at you. zOS is one of those products that has too much of a good thing, that is there is a LOT of documentation. This fact very quickly becomes an advantage as one gains more experience. No... [More]
In a couple of previous posts ( TOC Overflow: what is it, and why should you care? , Dealing with TOC overflow: the traditional approach ) I have presented the issue of TOC overflow. Now I will discuss some features of the XL compilers that can help bypass TOC overflow while minimizing any negative effects on runtime performance.
1. Minimal TOC: The option -qminimaltoc makes the compiler generate code that uses a single entry in the TOC for each compilation unit (in C/C++ a compilation unit is a source file). In order to do this, a... [More]