On Fri, 29.11.13 14:45, Colin Walters (walt...@verbum.org) 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:
Note that C11 static_assert is explicitly allowed at the top-level (heck, even inside of structs and unions!), so on modern systems we should make use of that and not have to introduce a distinction there... As it appears there are some gcc versions which claim to support C11 static assert but implement it so that compiler warnings are generated if used otuside of blocks and with our sets of warnings set. My suggestion is to turn off these warnings on those compiler versions (and only on those compiler versions), and leave them on for new versions where this is not an issue. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel