Visual C++ Compiler Warning C4226

Message Text

nonstandard extension used : 'keyword' is an obsolete keyword

Circumstances

At present, the keywords that are disabled as obsolete in the sense of triggering this warning are:

__far, __far16, __fortran, __huge, __near, __pascal, __serializable, __syscall and __transient

plus, if -Ze or -ZE is active:

one-underscore forms of each of the above

plus, if -Ze or -Zf is active:

no-underscore forms of some of the above, specifically far, fortran, huge, near and pascal

If the keyword is __serializable or __transient (with one or two leading underscores), the warning comes with a note:

the keyword '__serializable' is deprecated; use the attribute System::SerializableAttribute instead

or

the keyword '__transient' is deprecated; use the attribute System::NonSerializedAttribute instead

respectively.

Severity

This warning is promoted to an error automatically (as if the corresponding -we option were generated internally before the compiler acts on options from the command line). By default however, this is a level 1 warning and a

#pragma warning (default : 4226) 

restores it to level 1.