svn commit: r354856 - stable/12/sys/amd64/amd64
Konstantin Belousov
kostikbel at gmail.com
Tue Nov 19 18:33:58 UTC 2019
On Tue, Nov 19, 2019 at 05:08:13PM +0100, Hans Petter Selasky wrote:
> On 2019-11-19 16:32, Konstantin Belousov wrote:
> > +_Static_assert(nitems(gdt_segs) == NGDT, "Stale NGDT");
>
> Why are you not using the CTASSERT() macro? Is _Static_assert() portable?
_Static_assert() is the feature of C11, while CTASSERT() is an old
FreeBSD macro, which historically has very serious usability issues
(they were fixed by redefining CTASSERT() to just _Static_assert() with
useless message).
In this sense yes, _Static_assert() is more portable, but I also do not see
a reason to introduce new uses of CTASSERT().
More information about the svn-src-stable-12
mailing list