Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Sep 2016 16:47:21 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Ed Schouten <ed@nuxi.nl>
Cc:        "Conrad E. Meyer" <cem@freebsd.org>, src-committers <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r300824 - head/lib/libmd
Message-ID:  <CAOtMX2iRgK29L=192BZT57BkGSFKCix5bdn9G_pT55t8hJcr7A@mail.gmail.com>
In-Reply-To: <CABh_MKmD%2B4%2B5ArxtoKkkOsQ7Zf%2BF5KhyT%2B-HJJn4S%2B5DDYfEJg@mail.gmail.com>
References:  <201605270531.u4R5VE6R006890@repo.freebsd.org> <CABh_MKnyrLOjSOdmeZn=6uVmV73fM4XXo1bXnOpja7K7UvzpCw@mail.gmail.com> <CAG6CVpXZXmw4j1s0dvsZi7jhy-XdfA8uk3ioQP2E4=TvE_DmBQ@mail.gmail.com> <CABh_MKmD%2B4%2B5ArxtoKkkOsQ7Zf%2BF5KhyT%2B-HJJn4S%2B5DDYfEJg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 27, 2016 at 1:00 AM, Ed Schouten <ed@nuxi.nl> wrote:
> 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 a=
n
>> 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



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