Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3655 closed Bugs (wontfix)

Sun Studio gives errors when comparing ptime using BOOST_CHECK_EQUAL

Reported by: Ákos Maróy <akos@…> Owned by: Gennadiy Rozental
Milestone: Boost 1.42.0 Component: test
Version: Boost 1.40.0 Severity: Problem
Keywords: Cc: akos@…

Description

the following source code:

#include <boost/date_time.hpp>
#include <boost/test/unit_test.hpp>

using namespace boost;

void foo() {
    posix_time::ptime time1;
    posix_time::ptime time2;

    BOOST_CHECK_EQUAL(time1, time2);
}

gives a whole bunch of warnings when compiling with the Sun Studio C++ compiler (Sun Studio 12 patch 1 on 64 bit Linux):

CC -I/opt/usr-sun/include -library=stlport4 -features=tmplife \
		-features=tmplrefstatic -compat=5 -mt -c -o t t.cpp
"/opt/usr-sun/include/boost/concept/detail/general.hpp", line 37: Warning: Initializing boost::algorithm::FormatterConcept<boost::algorithm::detail::empty_formatF<char>, boost::algorithm::detail::first_finderF<const char*, boost::algorithm::is_equal>, const char*>& to a NULL value.
"/opt/usr-sun/include/boost/concept/detail/general.hpp", line 37:     Where: While instantiating "boost::algorithm::FormatterConcept<boost::algorithm::detail::empty_formatF<char>, boost::algorithm::detail::first_finderF<const char*, boost::algorithm::is_equal>, const char*>::constraints()".
"/opt/usr-sun/include/boost/concept/detail/general.hpp", line 37:     Where: Instantiated from non-template code.
"/opt/usr-sun/include/boost/concept/detail/general.hpp", line 37: Warning: Initializing boost::algorithm::FormatterConcept<boost::algorithm::detail::const_formatF<boost::iterator_range<const char*>>, boost::algorithm::detail::first_finderF<const char*, boost::algorithm::is_equal>, const char*>& to a NULL value.
"/opt/usr-sun/include/boost/concept/detail/general.hpp", line 37:     Where: While instantiating "boost::algorithm::FormatterConcept<boost::algorithm::detail::const_formatF<boost::iterator_range<const char*>>, boost::algorithm::detail::first_finderF<const char*, boost::algorithm::is_equal>, const char*>::constraints()".
"/opt/usr-sun/include/boost/concept/detail/general.hpp", line 37:     Where: Instantiated from non-template code.
"/opt/usr-sun/include/boost/concept/detail/general.hpp", line 37: Warning: Initializing boost::algorithm::FinderConcept<boost::algorithm::detail::first_finderF<const char*, boost::algorithm::is_equal>, const char*>& to a NULL value.
"/opt/usr-sun/include/boost/concept/detail/general.hpp", line 37:     Where: While instantiating "boost::algorithm::FinderConcept<boost::algorithm::detail::first_finderF<const char*, boost::algorithm::is_equal>, const char*>::constraints()".
"/opt/usr-sun/include/boost/concept/detail/general.hpp", line 37:     Where: Instantiated from non-template code.
3 Warning(s) detected.

it would be nice if it didn't throw warnings

Change History (2)

comment:1 by Gennadiy Rozental, 13 years ago

Resolution: wontfix
Status: newclosed

There is nothing here Boost.Test related. Add '+d' to the command line to avoid warnings (and -g -KPIC while you at it). Otherwise you can check in mailing list, though Idoubt anyone cares about this warning/compiler.

comment:2 by Ákos Maróy <akos@…>, 13 years ago

thanks for the tip. though I'm not sure why would anyone not care about this compiler.

Note: See TracTickets for help on using tickets.