C++ Standard Library
  1. C++ Standard Library
  2. STDCXX-564

[MSVC] 64-bit conversion warnings building the library

    Details

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

      MSVC 8.0 x64 platform

    • Patch Info:
      Patch Available
    • Severity:
      Compiler Warning

      Description

      These warnings I got when building the library with MSVC 8.0 / x64 platform:

      file.cpp
      $(TOPDIR)\src\file.cpp(484) : warning C4244: 'argument' : conversion from '__int64' to 'long', possible loss of data
      $(TOPDIR)\src\file.cpp(493) : warning C4244: 'argument' : conversion from '__int64' to 'long', possible loss of data
      $(TOPDIR)\src\file.cpp(508) : warning C4244: 'argument' : conversion from 'unsigned __int64' to 'unsigned int', possible loss of data
      $(TOPDIR)\src\file.cpp(523) : warning C4244: 'argument' : conversion from 'unsigned __int64' to 'unsigned int', possible loss of data

      locale_core.cpp
      $(TOPDIR)\src\locale_core.cpp(141) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data

      num_put.cpp
      $(TOPDIR)\src\num_put.cpp(745) : warning C4244: 'argument' : conversion from '__int64' to 'int', possible loss of data
      $(TOPDIR)\src\num_put.cpp(772) : warning C4244: 'argument' : conversion from '__int64' to 'int', possible loss of data
      $(TOPDIR)\src\num_put.cpp(802) : warning C4244: 'argument' : conversion from '__int64' to 'int', possible loss of data
      $(TOPDIR)\src\num_put.cpp(830) : warning C4244: 'argument' : conversion from '__int64' to 'int', possible loss of data

      ti_num_get.cpp
      $(TOPDIR)\include\loc/_punct.cc(90) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
      $(TOPDIR)\include\loc/punct.h(143) : see reference to function template instantiation 'rw::rw_istreambuf_iterator __rw::_rw_match_name<char,std::istreambuf_iterator<_CharT,_Traits>>(std::istreambuf_iterator<_CharT,_Traits>,std::istreambuf_iterator<_CharT,_Traits>,const char *const *,const unsigned __int64 *,unsigned __int64,unsigned __int64 &,int &,std::ios_base *)' being compiled
      with
      [
      _CharT=char,
      _Traits=std::char_traits<char>
      ]

      ti_wnum_get.cpp
      $(TOPDIR)\include\loc/_punct.cc(90) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
      $(TOPDIR)\include\loc/punct.h(150) : see reference to function template instantiation 'rw::rw_wistreambuf_iterator __rw::_rw_match_name<wchar_t,std::istreambuf_iterator<_CharT,_Traits>>(std::istreambuf_iterator<_CharT,_Traits>,std::istreambuf_iterator<_CharT,_Traits>,const wchar_t *const *,const unsigned __int64 *,unsigned __int64,unsigned __int64 &,int &,std::ios_base *)' being compiled
      with
      [
      _CharT=wchar_t,
      _Traits=std::char_traits<wchar_t>
      ]
      $(TOPDIR)\include\loc/_punct.cc(90) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
      $(TOPDIR)\include\loc/num_get.cc(218) : see reference to function template instantiation '_InputIter __rw::_rw_match_name<char,std::istreambuf_iterator<_CharT,_Traits>>(_InputIter,_InputIter,const _CharT *const *,const unsigned __int64 *,unsigned __int64,unsigned __int64 &,int &,std::ios_base *)' being compiled
      with
      [
      _InputIter=std::istreambuf_iterator<char,std::char_traits<char>>,
      _CharT=char,
      _Traits=std::char_traits<char>
      ]
      $(TOPDIR)\include\loc/num_get.cc(172) : while compiling class template member function 'std::istreambuf_iterator<_CharT,_Traits> std::num_get<_CharT,_InputIter>::do_get(std::istreambuf_iterator<_CharT,_Traits>,std::istreambuf_iterator<_CharT,_Traits>,std::ios_base &,rw::_rw_iostate &,bool &) const'
      with
      [
      _CharT=char,
      _Traits=std::char_traits<char>,
      _InputIter=std::istreambuf_iterator<char,std::char_traits<char>>
      ]
      $(TOPDIR)\include\loc/_locale.h(346) : see reference to class template instantiation 'std::num_get<_CharT,_InputIter>' being compiled
      with
      [
      _CharT=char,
      _InputIter=std::istreambuf_iterator<char,std::char_traits<char>>
      ]
      $(TOPDIR)\include\loc/locale.h(88) : see reference to function template instantiation 'const __rw::rw_facet *rw::_rw_get_facet<_Facet>(const std::locale &,const _Facet *)' being compiled
      with
      [
      _Facet=std::numpunct<wchar_t>
      ]
      $(TOPDIR)\include\loc/_num_get.cc(196) : see reference to function template instantiation 'const _Facet &std::use_facet<std::numpunct<_CharT>>(const std::locale &)' being compiled
      with
      [
      _Facet=std::numpunct<wchar_t>,
      _CharT=wchar_t
      ]
      $(TOPDIR)\include\loc/num_get.cc(172) : while compiling class template member function 'std::istreambuf_iterator<_CharT,_Traits> std::num_get<_CharT,_InputIter>::do_get(std::istreambuf_iterator<_CharT,_Traits>,std::istreambuf_iterator<_CharT,_Traits>,std::ios_base &,rw::_rw_iostate &,bool &) const'
      with
      [
      _CharT=wchar_t,
      _Traits=std::char_traits<wchar_t>,
      _InputIter=std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
      ]
      $(TOPDIR)\include\loc/_num_get.h(276) : see reference to class template instantiation 'std::num_get<_CharT,_InputIter>' being compiled
      with
      [
      _CharT=wchar_t,
      _InputIter=std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
      ]

      1. stdlib.patch
        2 kB
        Farid Zaripov

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development