On 10/2/2011 2:18 PM, Stewart Gordon wrote:
Simply because we can't rely on every compiler to perform even the most basic
cases of DCE?

Consider:

   if (a) { ... code ... }

Sometimes, when debugging, I'll do:

   if (0 && a) { ... code ... }

to temporarily disable it. Should that be made illegal? If so, what about:

   const X = 0;
   if (X && a) { ... code ... }

Illegal too? What about:

   bool foo() { ... }
   if (foo() && a) { ... code ... }

where foo() may be evaluatable at compile time. How far should this go?

Reply via email to