svn commit: r300824 - head/lib/libmd

Alan Somers asomers at freebsd.org
Thu Sep 29 22:47:24 UTC 2016


On Fri, May 27, 2016 at 1:00 AM, Ed Schouten <ed at nuxi.nl> wrote:
> 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!

Is anybody still intending to write this feature?  I just ran into the
same c++-includability bug with sha256.h and sha512.h.  It would be
nice to fix them the right way instead of using r300824's workaround.

-Alan


More information about the svn-src-all mailing list