svn commit: r300824 - head/lib/libmd

Ed Schouten ed at nuxi.nl
Fri May 27 07:00:37 UTC 2016


2016-05-27 8:50 GMT+02:00 Conrad Meyer <cem at freebsd.org>:
> There's nothing to support — 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!

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


More information about the svn-src-all mailing list