Keywords And Protected Words In Macros

From Appmethod Topics
Jump to: navigation, search

Go Up to Defining And Undefining Macros Index

It is legal but ill-advised to use C++ keywords as macro identifiers:

#define int long    /* legal but probably catastrophic */
#define INT long    /* legal and possibly useful */

The following predefined global identifiers cannot appear immediately following a #define or #undef directive:

__DATE__, __FILE__, __LINE__, __STDC__, __TIME__