Controls language extensions to ANSI/ISO C++.
Compatibility:This pragma is compatible with the following platform targets:
|
Embedded 68K
|
#pragma cpp_extensions on | off | reset
Remarks:If this option is on, it enables these extensions to the ANSI C++ standard:
#pragma cpp_extensions on
void foo()
{
union {
long hilo;
struct { short hi, lo; }; // anonymous struct
};
hi=0x1234;
lo=0x5678; // hilo==0x12345678
}#pragma cpp_extensions on
struct Foo { void f(); }
void Foo::f()
{
void (Foo::*ptmf1)() = &Foo::f; // ALWAYS OK
void (Foo::*ptmf2)() = f; // OK if cpp_extensions is on.
}
This pragma does not correspond to any option in the C/C++ Language Panel. To check whether this option is on, use the __option (cpp_extensions), described in "Checking Options." By default, this option is off.