[systemd-devel] [PATCH] Do not warn on declaration-after-statement

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri Jan 17 10:00:17 PST 2014


On Fri, Jan 17, 2014 at 06:58:01PM +0100, Lennart Poettering wrote:
> On Fri, 17.01.14 18:25, misc at zarb.org (misc at zarb.org) wrote:
> 
> > From: Michael Scherer <misc at zarb.org>
> > 
> > There is currently around 20 instances of the warning shown when compiling
> > systemd on Fedora 20, and no one seems to correct them. As this is a valid
> > C code for C99 and gcc support C99 since 3.0 ( ie more than 10 years ), it
> > may not be worth showing this warning.
> 
> We generally try to avoid declarations after statements in our coding
> style, which is the reason why this warning is on. Note that this
> warning you see only happens on some gcc versions, i.e. versions where
> C11 static_assert()s is new. Older versions which lack support for it,
> and newer versions will not generate the warning.
Hm, I have gcc-4.8.2-7.fc20.x86_64. In version is this fixed?

Zbyszek


More information about the systemd-devel mailing list