Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2017 09:14:29 +0200
From:      Ed Schouten <ed@nuxi.nl>
To:        Mark Millard <markmi@dsl-only.net>
Cc:        Warner Losh <imp@freebsd.org>, svn-src-head@freebsd.org,  FreeBSD Current <freebsd-current@freebsd.org>,  FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>, freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: svn commit: r322875 - head/sys/dev/nvme
Message-ID:  <CABh_MKnQ6CGj16Biyi1m8FWSmorh5_kpfxLA9tQ232tQLQabGQ@mail.gmail.com>
In-Reply-To: <1C5A448F-C91A-4599-8500-E4E46E6F5205@dsl-only.net>
References:  <1C5A448F-C91A-4599-8500-E4E46E6F5205@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
2017-08-25 8:32 GMT+02:00 Mark Millard <markmi@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@nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717



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