Why are empty expressions legal in C/C++?

后端 未结 11 1812
囚心锁ツ
囚心锁ツ 2020-11-29 11:21
int main()
{
  int var = 0;; // Typo which compiles just fine
}
11条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 11:57

    How else could assert(foo == bar); compile down to nothing when NDEBUG is defined?

提交回复
热议问题