Prevent bitrot on configure-switched options.

From: Robert Collins <robertc@dont-contact.us>
Date: Fri, 20 Jun 2003 21:42:06 +1000

I was reading the gnu coding standards the other day. One suggestion
therein that I quite liked is to (where system headers permit) change:

#if OPTION
  // some code here
#endif

to
  if (OPTION) {
      // some code here
   }

Their rational is that:
* The compiler then checks all code paths for parsability, scoping
issues, variable renames ettc.
* The resulting code should be identical with any reasonable optimising
compiler.
* It makes software with many options easier to maintain.

Thoughts?
Rob
Received on Fri Jun 20 2003 - 05:42:05 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:09 MST