On Mon, Sep 17, 2007 at 10:23:06AM +0200, Jean-Marc Lasgouttes wrote: > [EMAIL PROTECTED] writes: > > bool dummy = conv.To->dummy() && conv.to != "program"; > > - if (!dummy) > > + if (!dummy) { > > LYXERR(Debug::FILES) << "Converting from " > > << conv.from << " to " << conv.to << endl; > > + } > > infile = outfile; > > So the code is like > > if (!dummy) > if (!lyxerr.debugging(Debug::FILES)) ; else lyxerr << "Converting from > " > << conv.from << " to " << conv.to << endl; > > Isn't there some documented trick that avoids this warning? Having to > add braces around the second if is not nice.
Actually the 'if (!...); else ' is there to make exactly the use without braces woring in a robust manner. There's nothing wrong with if if else. The else always binds to the innermost acceptable if, and with the macro we provide this if. So it's slightly annoying to have gcc compile in this case. > Is there a way with gcc to silence a warning at a given place? Good question. Andre'