-+ (plus sign) (C++ only)
Category
Pragma equivalent
None.
Purpose
Compiles any file as a C++ language file.
This option is equivalent to the -x c++ option.
Usage
You can use -+ to compile a file with any suffix other than .a, .o, .so, .S or .s. If you do not use the -+ option, files must have a suffix of .C (uppercase C), .cc, .cp, .cpp, .cxx, or .c++ to be compiled as a C++ file. If you compile files with suffix .c (lowercase c) without specifying -+, the files are compiled as a C language file.
You cannot use the -+ option with the -qsourcetype or -x option.
Predefined macros
None.
Examples
To compile the file myprogram.cplspls as a C++ source file, enter:
xlc -+ myprogram.cplspls