incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Farid Zaripov <Far...@kyiv.vdiweb.com>
Subject [PATCH] MSVC 7.0 stdlib compatibility patch
Date Tue, 19 Sep 2006 18:03:31 GMT
  > -----Original Message-----
  > From: Martin Sebor [mailto:sebor@roguewave.com]
  > Sent: Monday, September 18, 2006 3:49 AM
  > To: stdcxx-dev@incubator.apache.org
  > Subject: Re: [PATCH] Scripts, generating solution and
  > projects for MSVC/ICC
  >
  > >   I have tried to build stdcxx on MSVC 7.0 and got some errors so I
  > > can say that we don't support MSVC 7.0 at the moment.
  >
  > Let's fix these before committing the changes.

    VC7.0 ignores cv qualifiers on 'void' type when it's used as template
argument (http://www.dotnet247.com/247reference/msgs/1/7727.aspx)

    Due to this bug the file include/rw/_autoptr.h has failed to compile.
I've added test for that (CV_VOID_SPECIALIZATIONS.cpp) to the source 
files in etc/config/src folder.


    VC7.0 also do not support "Partial Ordering of Function Templates"
(http://support.microsoft.com/kb/240869/).
Due to this bug the etc/config/src/VA_LIST.cpp has failed to compile
at configure step, which was caused the error:
src\exception.cpp(503) : error C2065: 'va_copy' : undeclared identifier


    And due this bug was another error:

include\loc\_num_put.cc(197) : error C2667: '__rw::__rw_iter_failed' :
none of 2 overloads have a best conversion
          include\loc\_num_put.cc(47): could be 'bool
__rw::__rw_iter_failed(const std::ostreambuf_iterator<_CharT,_Traits> &)'
          include\loc\_num_put.cc(43): or       'bool
__rw::__rw_iter_failed(const _OutputIter &)'
          while trying to match the argument list
'(std::num_put<_CharT,_OutputIter>::iter_type)'
          with
          [
              _CharT=wchar_t,

_OutputIter=std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
          ]

    I've made the changes (the diff file stdlib.diff is attached):

    ChangeLog:
    * limits: Corrected macro _RWSTD_SPECIALIZE_LIMITS
    (#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC branch)
    * CV_VOID_SPECIALIZATIONS.cpp: New file, checking for cv qualifiers
    on type void
    * VA_LIST.cpp: Added code to deal with compilers, which are not
    supports the "Partial Ordering of Function Templates"
    * _num_put.cc (__rw_iter_failed): The same.


    After that the stdlib has been compiled successfully, but rwtest
failed with error:

tests\include\rw_char.h(125) : error C2446: '==' : no conversion from
'const int *' to 'void *const '
          Conversion loses qualifiers
tests\include\rw_char.h(133) : error C2446: '==' : no conversion from
'const int *' to 'void *const '
          Conversion loses qualifiers
tests\include\rw_char.h(169) : error C2446: '==' : no conversion from
'const int *' to 'void *const '
          Conversion loses qualifiers
tests\include\rw_char.h(170) : error C2446: '==' : no conversion from
'const int *' to 'void *const '
          Conversion loses qualifiers

    I've made another patch (the diff file rw_char.h.diff is attached):

    ChangeLog:
    * rw_char.h (UserCharFmatInit): Added _TEST_EXPORT specification
    (UserInt): Added const_cast to avoid MSVC 7.0 error "C2446: '=='
    : no conversion from 'const int *' to 'void *const '"

    After that the rwtest has been compiled successfully, but many of
tests has failed to compile. I've fixed the three tests yet
(tests.diff):

    ChangeLog:
    * _specialized.h: Added code to deal with compilers, which are not
    supports the "Partial Ordering of Function Templates"
    * 20.operators.cpp: added #include <cstddef> for std::size_t
    * 20.pairs.cpp: Added #ifdef/#endif guard to avoid error
    "Cannot access private copy constructor"

    The build log with errors is here: 
http://people.apache.org/~faridz/buildlog.log

    Do we still want to support the MSVC 7.0? :)


Farid.


Mime
View raw message