Follow-up Comment #7, bug #11022 (project grep):

The "do { ... } while (0)" makes it the syntactical equivalent of a  function
call.  Consider

#define F(x) if (x) h(x)
#define G(x) do { if (x) h(x); } while (0)

{
  if (y)
    F(x);
  else
    z++;

  if (y)
    G(x);
  else
    z++;
}

and match the "else" statements to their corresponding "if".  (Code
indentation will probably be lost on the Savannah web page.)

The construct will otherwise usually be removed by the optimizer.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11022>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



Reply via email to