Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 09:00:35 +0200
From:      Ed Schouten <ed@nuxi.nl>
To:        "Conrad E. Meyer" <cem@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r300824 - head/lib/libmd
Message-ID:  <CABh_MKmD%2B4%2B5ArxtoKkkOsQ7Zf%2BF5KhyT%2B-HJJn4S%2B5DDYfEJg@mail.gmail.com>
In-Reply-To: <CAG6CVpXZXmw4j1s0dvsZi7jhy-XdfA8uk3ioQP2E4=TvE_DmBQ@mail.gmail.com>
References:  <201605270531.u4R5VE6R006890@repo.freebsd.org> <CABh_MKnyrLOjSOdmeZn=6uVmV73fM4XXo1bXnOpja7K7UvzpCw@mail.gmail.com> <CAG6CVpXZXmw4j1s0dvsZi7jhy-XdfA8uk3ioQP2E4=TvE_DmBQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2016-05-27 8:50 GMT+02:00 Conrad Meyer <cem@freebsd.org>:
> There's nothing to support =E2=80=94 literally ignoring the keyword is an
> acceptable implementation.  So it's disappointing C++ chooses to
> reject C keywords.

Keep in mind that C++ does not reject "static" altogether; only in
this specific context. The reason for it is that in C++, there are
other ways of enforcing similar properties. For example by using
std::array, which has the size as part of its type.

> If sys/md5.h includes a static inline function, there are bigger
> problems with potentially trying to interpret C code as C++.

We have quite a lot of public header files that contain static inline
functions that also work well in C++ mode. <sys/utsname.h> is a good
example.

> Your proposed macro seems ok, although it is pretty long for where it
> would be used.  Maybe __min_size()?

Sure!

--=20
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_MKmD%2B4%2B5ArxtoKkkOsQ7Zf%2BF5KhyT%2B-HJJn4S%2B5DDYfEJg>