Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/fs/puffs
On Tue, Oct 07, 2014 at 12:40:04AM +0700, Robert Elz wrote:
> Date: Mon, 6 Oct 2014 14:26:44 +0000
> From: "Havard Eidnes" <he%netbsd.org@localhost>
> Message-ID: <20141006142644.769369A%cvs.netbsd.org@localhost>
>
> | Make this build again without debugging enabled; DPRINTF() can end up
> | as empty, and in an if conditional, you then need braces if that's the
> | only potential body.
>
> That change makes no sense to me - the original code was
>
> if (error)
> DPRINTF((....));
>
> and even if DPRINTF() could produce nothing, the result would be
>
> if (error)
> ;
>
> which is perfectly good C (useless, but acceptable). Adding { } around
> the ';' changes nothing.
Consider what happens if you write:
if (error)
DPRINTF((...));
else
fubar();
When DPRINTF() expands 'if (xxx) yyy' it all goes horribly wrong.
Do we need to support any compilers that don't support __VA_ARGS__ ?
Even microsoft's compiler almost supports it.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index