Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-648

[MSVC] errors compiling with _RWSTD_STRICT_ANSI

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: Build and Installation
    • Labels:
      None
    • Environment:

      MSVC, ICC/Windows

    • Patch Info:
      Patch Available
    • Severity:
      Compiler Error

      Description

      I've built the .configure project and appended #define _RWSTD_STRICT_ANSI to the generated config.h file. After that the library compiled with the following errors (MSVC 8):

      ------ Build started: Project: .stdcxx, Configuration: 15s Debug Thread-safe Static Win32 ------
      ...
      iostream.cpp
      D:\stdcxx\trunk\include\fstream(122) : warning C4099: 'std::ios_base::Init' : type name first seen using 'struct' now seen using 'class'
      D:\stdcxx\trunk\include\rw/_iosbase.h(221) : see declaration of 'std::ios_base::Init'
      D:\stdcxx\trunk\include\fstream(274) : see reference to class template instantiation 'std::basic_filebuf<_CharT,_Traits>' being compiled
      D:\stdcxx\trunk\include\fstream(122) : warning C4099: 'std::ios_base::Init' : type name first seen using 'struct' now seen using 'class'
      D:\stdcxx\trunk\include\rw/_iosbase.h(221) : see declaration of 'std::ios_base::Init'
      D:\stdcxx\trunk\include\fstream(668) : see reference to class template instantiation 'std::basic_filebuf<_CharT>' being compiled
      with
      [
      _CharT=char
      ]
      D:\stdcxx\trunk\include\fstream(122) : warning C4099: 'std::ios_base::Init' : type name first seen using 'struct' now seen using 'class'
      D:\stdcxx\trunk\include\rw/_iosbase.h(221) : see declaration of 'std::ios_base::Init'
      D:\stdcxx\trunk\include\fstream(676) : see reference to class template instantiation 'std::basic_filebuf<_CharT>' being compiled
      with
      [
      _CharT=wchar_t
      ]
      ...
      ti_filebuf.cpp
      D:\stdcxx\trunk\include\fstream(122) : warning C4099: 'std::ios_base::Init' : type name first seen using 'struct' now seen using 'class'
      D:\stdcxx\trunk\include\rw/_iosbase.h(221) : see declaration of 'std::ios_base::Init'
      D:\stdcxx\trunk\include\fstream(274) : see reference to class template instantiation 'std::basic_filebuf<_CharT,_Traits>' being compiled
      D:\stdcxx\trunk\include\fstream(122) : warning C4099: 'std::ios_base::Init' : type name first seen using 'struct' now seen using 'class'
      D:\stdcxx\trunk\include\rw/_iosbase.h(221) : see declaration of 'std::ios_base::Init'
      D:\stdcxx\trunk\include\fstream(668) : see reference to class template instantiation 'std::basic_filebuf<_CharT>' being compiled
      with
      [
      _CharT=char
      ]
      ...
      ti_istream.cpp
      D:\stdcxx\trunk\include\istream.cc(53) : error C2664: 'std::istreambuf_iterator<CharT,_Traits> std::num_get<_CharT,_InputIter>::get(std::istreambuf_iterator<_CharT,_Traits>,std::istreambuf_iterator<_CharT,_Traits>,std::ios_base &,rw::_rw_iostate &,bool &) const' : cannot convert parameter 5 from 'short' to 'bool &'
      with
      [
      _CharT=char,
      _Traits=std::char_traits<char>,
      _InputIter=std::istreambuf_iterator<char,std::char_traits<char>>
      ]
      D:\stdcxx\trunk\include\istream(164) : see reference to function template instantiation 'std::basic_istream<CharT> &rw::_rw_extract<char,std::char_traits<char>,short>(std::basic_istream<_CharT> &,_NativeType &)' being compiled
      with
      [
      _CharT=char,
      _NativeType=short
      ]
      D:\stdcxx\trunk\include\istream(163) : while compiling class template member function 'std::basic_istream<_CharT> &std::basic_istream<_CharT>::operator >>(short &)'
      with
      [
      _CharT=char
      ]
      D:\stdcxx\trunk\include\istream(585) : see reference to class template instantiation 'std::basic_istream<_CharT>' being compiled
      with
      [
      _CharT=char
      ]
      D:\stdcxx\trunk\include\istream.cc(53) : error C2664: 'std::istreambuf_iterator<CharT,_Traits> std::num_get<_CharT,_InputIter>::get(std::istreambuf_iterator<_CharT,_Traits>,std::istreambuf_iterator<_CharT,_Traits>,std::ios_base &,rw::_rw_iostate &,bool &) const' : cannot convert parameter 5 from 'int' to 'bool &'
      with
      [
      _CharT=char,
      _Traits=std::char_traits<char>,
      _InputIter=std::istreambuf_iterator<char,std::char_traits<char>>
      ]
      D:\stdcxx\trunk\include\istream(172) : see reference to function template instantiation 'std::basic_istream<CharT> &rw::_rw_extract<char,std::char_traits<char>,int>(std::basic_istream<_CharT> &,_NativeType &)' being compiled
      with
      [
      _CharT=char,
      _NativeType=int
      ]
      D:\stdcxx\trunk\include\istream(171) : while compiling class template member function 'std::basic_istream<_CharT> &std::basic_istream<_CharT>::operator >>(int &)'
      with
      [
      _CharT=char
      ]
      ...
      ti_podarray.cpp
      d:\stdcxx\trunk\src\podarray.h(86) : error C2027: use of undefined type 'std::char_traits<_CharT>'
      with
      [
      _CharT=const unsigned int *
      ]
      d:\stdcxx\trunk\src\podarray.h(86) : while compiling class template member function '_rw::rw_pod_array<_TypeT,_Size>::_rw_pod_array(const _TypeT *)'
      with
      [
      _TypeT=const unsigned int *,
      _Size=1024
      ]
      d:\stdcxx\trunk\src\podarray.h(214) : see reference to class template instantiation '_rw::_rw_pod_array<_TypeT,_Size>' being compiled
      with
      [
      _TypeT=const unsigned int *,
      _Size=1024
      ]
      d:\stdcxx\trunk\src\podarray.h(86) : error C3861: 'length': identifier not found
      ...
      ti_wfilebuf.cpp
      D:\stdcxx\trunk\include\fstream(122) : warning C4099: 'std::ios_base::Init' : type name first seen using 'struct' now seen using 'class'
      D:\stdcxx\trunk\include\rw/_iosbase.h(221) : see declaration of 'std::ios_base::Init'
      D:\stdcxx\trunk\include\fstream(274) : see reference to class template instantiation 'std::basic_filebuf<_CharT,_Traits>' being compiled
      D:\stdcxx\trunk\include\fstream(122) : warning C4099: 'std::ios_base::Init' : type name first seen using 'struct' now seen using 'class'
      D:\stdcxx\trunk\include\rw/_iosbase.h(221) : see declaration of 'std::ios_base::Init'
      D:\stdcxx\trunk\include\fstream(676) : see reference to class template instantiation 'std::basic_filebuf<_CharT>' being compiled
      with
      [
      _CharT=wchar_t
      ]
      ...
      ti_wistream.cpp
      D:\stdcxx\trunk\include\istream.cc(53) : error C2664: 'std::istreambuf_iterator<CharT,_Traits> std::num_get<_CharT,_InputIter>::get(std::istreambuf_iterator<_CharT,_Traits>,std::istreambuf_iterator<_CharT,_Traits>,std::ios_base &,rw::_rw_iostate &,bool &) const' : cannot convert parameter 5 from 'short' to 'bool &'
      with
      [
      _CharT=wchar_t,
      _Traits=std::char_traits<wchar_t>,
      _InputIter=std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
      ]
      D:\stdcxx\trunk\include\istream(164) : see reference to function template instantiation 'std::basic_istream<CharT> &rw::_rw_extract<wchar_t,std::char_traits<wchar_t>,short>(std::basic_istream<_CharT> &,_NativeType &)' being compiled
      with
      [
      _CharT=wchar_t,
      _NativeType=short
      ]
      D:\stdcxx\trunk\include\istream(163) : while compiling class template member function 'std::basic_istream<_CharT> &std::basic_istream<_CharT>::operator >>(short &)'
      with
      [
      _CharT=wchar_t
      ]
      D:\stdcxx\trunk\include\istream(598) : see reference to class template instantiation 'std::basic_istream<_CharT>' being compiled
      with
      [
      _CharT=wchar_t
      ]
      D:\stdcxx\trunk\include\istream.cc(53) : error C2664: 'std::istreambuf_iterator<CharT,_Traits> std::num_get<_CharT,_InputIter>::get(std::istreambuf_iterator<_CharT,_Traits>,std::istreambuf_iterator<_CharT,_Traits>,std::ios_base &,rw::_rw_iostate &,bool &) const' : cannot convert parameter 5 from 'int' to 'bool &'
      with
      [
      _CharT=wchar_t,
      _Traits=std::char_traits<wchar_t>,
      _InputIter=std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
      ]
      D:\stdcxx\trunk\include\istream(172) : see reference to function template instantiation 'std::basic_istream<CharT> &rw::_rw_extract<wchar_t,std::char_traits<wchar_t>,int>(std::basic_istream<_CharT> &,_NativeType &)' being compiled
      with
      [
      _CharT=wchar_t,
      _NativeType=int
      ]
      D:\stdcxx\trunk\include\istream(171) : while compiling class template member function 'std::basic_istream<_CharT> &std::basic_istream<_CharT>::operator >>(int &)'
      with
      [
      _CharT=wchar_t
      ]
      ...
      .stdcxx - 6 error(s), 9 warning(s)
      ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

        Attachments

        1. stdcxx-648-2.patch
          9 kB
          Farid Zaripov
        2. stdcxx-648.patch
          5 kB
          Farid Zaripov

          Issue Links

            Activity

              People

              • Assignee:
                farid Farid Zaripov
                Reporter:
                farid Farid Zaripov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 8h
                  8h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8h
                  8h