Why are empty statements legal?
c, c++, language-design, syntax
Solution
This is the way C and C++ express NOP.
Problem
``` int main() { int var = 0;; // Typo which compiles just fine } ``` In both C and C++, this is allowed because an expression-statement may be just a `;`, which makes it a "null statement". Why is this allowed?