[systemd-devel] [PATCH] use static_assert instead of assert_cc

Thomas H.P. Andersen phomes at gmail.com
Sat Dec 29 14:14:15 PST 2012


On Sat, Dec 29, 2012 at 5:04 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Sat, Dec 29, 2012 at 02:10:27AM +0100, Thomas H.P. Andersen wrote:
>> Another item from the todo
> Hi,
>
> the patch looks great, but it raises compatibility problems. AFAICT,
> required gcc version to raised to 4.6. Debian/squeeze has 4.4.

According to http://gcc.gnu.org/projects/cxx0x.html static_assert
should be supported from gcc 4.3

> clang has _Static_assert, not static_assert. I think that a compile
> time check is in order. Support for old gcc versions is less
> important, so it might be enough to document the requirement in
> README, and then maybe provide a fallback if people complain. OTOH
> clang compilation support is useful (and used), so it should be kept.

It builds with clang here. That is with "clang version 3.1
(branches/release_31)" from F18.


More information about the systemd-devel mailing list