次のコードがあり、コンパイルしようとするとエラーが発生します。
エラー: 'list_item_t' には 'state' という名前のメンバーがありません</p>
このコードを警告やエラーなしでコンパイルするための創造的なアイデアはありますか?
#if defined (_DEBUG_)
#define ASSERT assert
#else /* _DEBUG_ */
#define ASSERT( exp ) ((void)(exp))
#endif`
typedef struct list_item {
struct list_item *p_next;
struct list_item *p_prev;
#ifdef _DEBUG_
int state;
#endif
} list_item_t;
main(int argc, char *argv)
{
list_item_t p_list_item;
ASSERT(p_list_item.state == 0);
}