[systemd-devel] [HEADS-UP] It's release time!

Lennart Poettering lennart at poettering.net
Wed Feb 19 17:03:42 PST 2014

On Thu, 20.02.14 01:21, Uoti Urpala (uoti.urpala at pp1.inet.fi) wrote:

> On Wed, 2014-02-19 at 17:53 +0100, Lennart Poettering wrote:
> > Zbigniew suggest we should drop -Wdeclaration-after-statement. I am not
> > convinced that that would be a good idea since generally declarations
> > after statements are an abomination, and we should avoid them, and it is
> > nice if gcc warns about that.
> Even if there can be reasonable style disagreements about exactly where
> to use mixed declarations, at least some uses of them are certainly
> beneficial. It's only a matter of getting used to reading them if you've
> only read old-style code before. I'm sure that if C had had mixed
> declarations from the beginning, nobody would come up with a coding
> style which declared that particular feature to be harmful.
> Given systemd's approach to features, I think it's pretty ironic if its
> coding style has a "you can't expect me to get used to new features"
> attitude to something that's been used for more than a decade.

Oh, it's really not like that. We make use of a lot of newer language
features all the time. We have have a lot of gccisms in our code, such
as the gcc cleanup attribute. And there's already C11 bits in the code,
too. However, there are certain language features that we consider
obvious improvements and there are others where we are a lot more

It's a matter of taste I figure, it's like tabs vs. spaces. We don't
allow tabs either in our sources... And neither do we allow declaration
after statements...

We are apparently not alone on this btw, after all gcc *does* have this
warning flag support even in C99 and C11 mode...


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list