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

2017-08-28 Thread Ed Schouten
2017-08-28 11:02 GMT+02:00 Mark Millard : > Based on the same main.cc as before . . . > > g++7 -std=c++98 main.cc > g++7 -Wpedantic -std=c++98 main.cc > g++7 -std=c++03 main.cc > g++7 -Wpedantic -std=c++03 main.cc > > no longer complain (so no error, no > warning). Perfect!

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

2017-08-28 Thread Mark Millard
On 2017-Aug-27, at 11:54 PM, Ed Schouten wrote: > 2017-08-25 14:53 GMT+02:00 Ed Schouten : >> 2017-08-25 9:46 GMT+02:00 Mark Millard : >>> It appears that at least 11.1-STABLE -r322807 does not handle >>> -std=c++98 styles of use of _Static_assert for g++7 in that >>> g++7 reports an error: >>

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

2017-08-28 Thread Ed Schouten
Mark, 2017-08-25 14:53 GMT+02:00 Ed Schouten : > 2017-08-25 9:46 GMT+02:00 Mark Millard : >> It appears that at least 11.1-STABLE -r322807 does not handle >> -std=c++98 styles of use of _Static_assert for g++7 in that >> g++7 reports an error: > > Maybe we need

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

2017-08-25 Thread Warner Losh
On Fri, Aug 25, 2017 at 6:53 AM, Ed Schouten wrote: > 2017-08-25 9:46 GMT+02:00 Mark Millard : > > It appears that at least 11.1-STABLE -r322807 does not handle > > -std=c++98 styles of use of _Static_assert for g++7 in that > > g++7 reports an error: > > Maybe

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

2017-08-25 Thread Ed Schouten
2017-08-25 9:46 GMT+02:00 Mark Millard : > It appears that at least 11.1-STABLE -r322807 does not handle > -std=c++98 styles of use of _Static_assert for g++7 in that > g++7 reports an error: Maybe we need to do something like this? Index: sys/sys/cdefs.h

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

2017-08-25 Thread Mark Millard
On 2017-Aug-25, at 12:14 AM, David Chisnall wrote: > On 25 Aug 2017, at 07:32, Mark Millard wrote: >> >> As I remember _Static_assert is from C11, not >> the older C99. > > In pre-C11 dialects of C, _Static_assert is an identifier reserved for the > implementation. sys/cdefs.h defines it

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

2017-08-25 Thread Ed Schouten
2017-08-25 8:32 GMT+02:00 Mark Millard : >> # 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

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

2017-08-25 Thread David Chisnall
On 25 Aug 2017, at 07:32, Mark Millard wrote: > > As I remember _Static_assert is from C11, not > the older C99. In pre-C11 dialects of C, _Static_assert is an identifier reserved for the implementation. sys/cdefs.h defines it to generate a zero-length array if the

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

2017-08-25 Thread Mark Millard
> Author: imp > Date: Fri Aug 25 04:33:06 2017 > New Revision: 322875 > URL: > https://svnweb.freebsd.org/changeset/base/322875 > > > Log: > Use _Static_assert > > These files are compiled in userland too, so we can't use sys/systm.h > and rely on CTASSERT. Switch to using