svn commit: r322875 - head/sys/dev/nvme

Ed Schouten ed at nuxi.nl
Fri Aug 25 07:15:01 UTC 2017


2017-08-25 8:32 GMT+02:00 Mark Millard <markmi at dsl-only.net>:
>> # g++49 main.cc
>> main.cc:2:15: error: expected constructor, destructor, or type conversion before '(' token
>>  _Static_assert(1,"Test");

Yeah, that's because GCC is such a pain in the neck compiler that it
doesn't want to expose these C11 keywords when building C++, even
though they are in the reserved namespace (_[A-Z]). GCC would be
permitted to expose these and still comply to standards. Doing so
would make things so much easier for operating system implementors,
like us. Clang does get it right, in my opinion.

We should just extend <sys/cdefs.h> to define _Static_assert() when
using GCC in C++ mode (if we're not doing so already).

-- 
Ed Schouten <ed at nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717


More information about the freebsd-stable mailing list