dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06770
Re: A general comment on bugs with uninitialized vectors
2008/3/25, Johan Hake <hake@xxxxxxxxx>:
> On Tuesday 25 March 2008 13:38:22 Martin Sandve Alnæs wrote:
> > But what's the point of the "do { ... } while(false);" ??
> > { ... } or just ... should be the same thing as far as I can see.
>
>
> It's because macros are evil! :)
>
> http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.4
>
> It looks like macros with if statements have a risk of nesting with the wrong
> if, if it is used inside an other if statement. (Nice sentence! :) )
Yes, but a simple {} should do the trick to define a local scope. No
need for do-while.
--
Martin
Follow ups
References