Some IBM C and C++ Compilers options are only valid when compiling C programs, while others only apply to C++ programs.
C Programs Only
| /qalias | Specifies aliasing rules. The typeptr, allptrs, and addrtaken suboptions can only be used in C programs. Only the ansi suboption can be used in C++ programs. |
| /Sg | Set margins for input files. This option is provided primarily for compatibility with IBM C/370. C++ does not require any such compatibility. |
| /Sq | Set sequence numbers for input files. This option is provided primarily for compatibility with IBM C/370. C++ does not require any such compatibility. |
| /Sr | Set type conversion rules. The C++ language only supports the new type conversion rules defined by the ANSI standard. |
| /Ss | Allow use of double slashes for comments. C++ allows double slashes to indicate comments as part of the language. |
| /S2 | Allow only SAA Level 2 C constructs. There is no SAA definition of the C++ language. |
C++
Programs Only
| /Ft | Control generation of files for template resolution. The C language does not support templates. |
| /Gk | Link with Version 2 C++ libraries. |
| /Gx | Control inclusion of C++ exception-handling information. The C language does not include specific constructs for exception handling. |
| /Sc | Allows constructs compatible with earlier versions of the C++ language. These constructs are not allowed in C. |
| /Nx | Set names of exception-handling segments. |
| /qrtti | Generate information for the typeid operator and the dynamic_cast operator. |
| /qsomvolattr | Use volatile on attribute prototypes. |
![]()
Summary of Compiler Options
Summary of Compiler Options by Function