#define defined
#if defined defined
#error defined is defined!
#endif
#define is_Z_defined defined Z
#if defined Z
#error Z is not defined
#endif
#if is_Z_defined
#error Macro expanding into defined operator test 1
#endif
#define Z
#if !defined Z
#error Z is defined
#endif
#if !is_Z_defined
#error Macro expanding into defined operator test 2
#endif
#undef is_Z_defined
#undef Z
#if defined(defined)
#error defined is defined!
#endif
#define is_Z_defined defined ( Z )
#if defined(Z)
#error Z is not defined
#endif
#if is_Z_defined
#error Macro expanding into defined operator test 1
#endif
#define Z
#if !defined(Z)
#error Z is defined
#endif
#if !is_Z_defined
#error Macro expanding into defined operator test 2
#endif
#define bad1 defined
#if !bad1 Z
#error Z is defined
#endif
#if !bad1 (Z)
#error Z is defined
#endif
#define bad2 defined (Z
#if !bad2)
#error Z is defined
#endif