Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Nov 2019 20:33:50 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   Re: svn commit: r354856 - stable/12/sys/amd64/amd64
Message-ID:  <20191119183349.GA2707@kib.kiev.ua>
In-Reply-To: <5b2560fa-78b8-457a-a6ba-a48547bae438@selasky.org>
References:  <201911191532.xAJFWFru096735@repo.freebsd.org> <5b2560fa-78b8-457a-a6ba-a48547bae438@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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().



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191119183349.GA2707>