On 04 Mar 2015, at 18:18, O. Hartmann <ohart...@zedat.fu-berlin.de> wrote:
> Am Wed, 4 Mar 2015 14:10:00 +0100
> Dimitry Andric <dimi...@andric.com> schrieb:
>> On 04 Mar 2015, at 12:31, O. Hartmann <ohart...@zedat.fu-berlin.de> wrote:
>>> On Mon, 2 Mar 2015 08:58:05 -0500
>>> Ryan Stone <ryst...@gmail.com> wrote:
>>>> Can you post the contents of your make.conf and src.conf?  I didn't
>>>> see this in any of my "make tinderbox" runs
>>>> _______________________________________________
>>>> freebsd-current@freebsd.org mailing list
>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>>>> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
>>> The culprit is the option
>>> CXXFLAGS+=             -std=c++11
>>> in /etc/src.conf
>> Right, it would be nice to have libnv compiling for C++11 though.  I'll have 
>> a look
>> later today.

It is caused by the following test in lib/libnv/tests/dnv_tests.cc:

        ATF_REQUIRE_EQ(actual_val, NULL);

In C++ mode, ATF_REQUIRE_EQ will attempt to output the value of NULL
onto a std::ostringstream, but this has become ambiguous in C++11. [1]

The fix is to cast the NULL value to the specific pointer type ATF is
testing against, 'nvlist_t *' in this case.  See the attached diff.


[1] Before C++11, NULL is defined as 0, e.g. plain zero, and it will
therefore be printed as an integer "0".  In C++11 and later, NULL is
defined as the keyword nullptr, e.g. the null pointer literal.  Since
the null pointer can be converted to any other pointer type, and there
are many different operators defined in C++ to output those operators,
the call is ambiguous, and must be resolved by the developer.

Attachment: libnv-fix-tests-cxx11-1.diff
Description: Binary data

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to