Contents|Index|Previous|Next

Extensions to the C++ Language

The GNU compiler provides extensions to the C++ language (and you can also use most of the C language extensions in your C++ programs). If you want to write code that checks whether these features are available, you can test for the GNU compiler the same way as for C programs: check for a predefined macro, __GNUC__. You can also use __GNUG__ to test specifically for GNU C++ (see “Standard Predefined Macros” in The C Preprocessor in this same volume of GNUPro Compiler Tools).

See the following documentation for more specific discussion regarding extensions to the C++ language family.

- NAMED RETURN VALUES IN C++
- MINIMUM AND MAXIMUM OPERATORS IN C++
- goto AND DESTRUCTORS IN GNU C++
- DECLARATIONS AND DEFINITIONS IN ONE HEADER
- WHERE’S THE TEMPLATE?
- TYPE ABSTRACTION USING SIGNATURES