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

From: Ed Schouten <ed_at_nuxi.nl>
Date: Fri, 25 Aug 2017 09:14:29 +0200
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
Received on Fri Aug 25 2017 - 05:15:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:13 UTC