best practice to handle unused variables depending on macros

Mathieu Lacage mathieu.lacage@gmail.com
Mon Feb 6 19:40:00 GMT 2012


On Mon, Feb 6, 2012 at 20:03, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> It's valid C, so any compiler will accept it and not evaluate the
> expression.  If you mean "will it suppress an unused variable warning"
> I don't know.

Yes, that was the question. Googling a bit did turn up useful
resources that appear to confirm this:

http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/

problem solved. Thanks a lot for the suggestion that did put me on the
right track.

Mathieu
-- 
Mathieu Lacage <mathieu.lacage@gmail.com>



More information about the Gcc-help mailing list