| Syntax: | Default: |
| lang(offsetOfNonPODClasses[,
yes]) lang(offsetOfNonPODClasses, no) |
lang(offsetOfNonPODClasses[, yes]) |
This option controls whether the offsetof macro can be applied to classes that are not data-only. C++ programmers often casually call data-only classes "Plain Old Data" (POD) classes.
By default, VisualAge C++ allows offsetof to be used with nonPOD classes. This is an extension to the C++ standard, and gives behavior that is compatible with the C++ compilers provided by VisualAge C++ for OS/2 3.0, VisualAge for C++ for Windows version 3.5, and Microsoft Visual C++
When this option is set to yes, you receive a warning if your code uses the extension, unless you suppress the message with report(disable, "CPPC1281").
Set offsetOfNonPODClasses to no for compliance with standard C++.
Set offsetOfNonPODClasses to yes if your code applies offsetof to a class that contains one of the following:
![]()
Incremental C++ Build
Configuration Files
![]()
Language Options for C++
Build Options
Build Options for Compliance With the C++
Standard
Build Options for Compatibility with Old
C++ Compilers
