On Fri, Nov 29, 2013 at 02:45:21PM -0500, Colin Walters wrote: > On Fri, 2013-11-29 at 02:39 +0100, Lennart Poettering wrote: > > On Thu, 28.11.13 00:54, Zbigniew Jędrzejewski-Szmek > > (zbys...@kemper.freedesktop.org) wrote: > > > Instead we should add some code to macro.h which turns off the the > > warning with the #pragma stuff only if it detects it is being run on an > > old gcc. > > There's also this approach: > >
> From 7affb075dd1889fbb6b8d8865dec4b5e1d36448f Mon Sep 17 00:00:00 2001 > From: Colin Walters <walt...@verbum.org> > Date: Fri, 29 Nov 2013 14:43:45 -0500 > Subject: [PATCH] macro: Split assert_cc, add assert_cc_toplevel > > To suppress warnings about -Wdeclaration-after-statement, we need to > wrap static asserts inside functions with a standard do {} while(0) > block. But the toplevel asserts can't have that, so add > assert_cc_toplevel for those. Actually I don't think we need to totally forbid declarations after statements. This is not something likely to be introduced by mistake, so I think we'll be fine even if only humans check for that. Zbyszek _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel