You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2007/09/11 18:57:32 UTC

[jira] Commented: (STDCXX-547) [Sun C++] 64-bit conversion warnings building the library

    [ https://issues.apache.org/jira/browse/STDCXX-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526523 ] 

Farid Zaripov commented on STDCXX-547:
--------------------------------------

The similar warnings 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>>
        ]


> [Sun C++] 64-bit conversion warnings building the library
> ---------------------------------------------------------
>
>                 Key: STDCXX-547
>                 URL: https://issues.apache.org/jira/browse/STDCXX-547
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: trunk
>         Environment: Sun C++ +w, wide mode (-xarch=amd64, -xarch=sparcv9, or -m64)
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>            Priority: Minor
>             Fix For: 4.2
>
>
> We get a bunch of 64-bit conversion warnings when building the library in wide (64-bit) mode with Sun C++ 5.8 and 5.9:
> gmake: Entering directory `$(BUILDDIR)/lib'
> CC -c -D_RWSTDDEBUG   -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include  -library=%none -g  -xarch=amd64 +w -errtags -erroff=hidef    $(TOPDIR)/src/assert.cpp
> ...
> CC -c -D_RWSTDDEBUG   -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include  -library=%none -g  -xarch=amd64 +w -errtags -erroff=hidef    $(TOPDIR)/src/locale_core.cpp
> "$(TOPDIR)/src/locale_core.cpp", line 141: Warning, truncwarn: Conversion of 64 bit type value to "int" causes truncation.
> "$(TOPDIR)/src/locale_core.cpp", line 141: Warning, truncwarn: Conversion of 64 bit type value to "int" causes truncation.
> 2 Warning(s) detected.
> ...
> CC -c -D_RWSTDDEBUG   -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include  -library=%none -g  -xarch=amd64 +w -errtags -erroff=hidef    $(TOPDIR)/src/num_get.cpp
> "$(TOPDIR)/src/num_get.cpp", line 432: Warning, truncwarn: Conversion of 64 bit type value to "unsigned" causes truncation.
> "$(TOPDIR)/src/num_get.cpp", line 461: Warning, truncwarn: Conversion of 64 bit type value to "int" causes truncation.
> 2 Warning(s) detected.
> CC -c -D_RWSTDDEBUG   -mt -I$(TOPDIR)/include -I$(BUILDDIR)/include  -library=%none -g  -xarch=amd64 +w -errtags -erroff=hidef    $(TOPDIR)/src/num_put.cpp
> "$(TOPDIR)/src/num_put.cpp", line 417: Warning, truncwarn: Conversion of 64 bit type value to "const int" causes truncation.
> "$(TOPDIR)/src/num_put.cpp", line 417: Warning, truncwarn: Conversion of 64 bit type value to "const int" causes truncation.
> "$(TOPDIR)/src/num_put.cpp", line 745: Warning, truncwarn: Conversion of 64 bit type value to "int" causes truncation.
> "$(TOPDIR)/src/num_put.cpp", line 772: Warning, truncwarn: Conversion of 64 bit type value to "int" causes truncation.
> "$(TOPDIR)/src/num_put.cpp", line 802: Warning, truncwarn: Conversion of 64 bit type value to "int" causes truncation.
> "$(TOPDIR)/src/num_put.cpp", line 830: Warning, truncwarn: Conversion of 64 bit type value to "int" causes truncation.
> 6 Warning(s) detected.
> ...
> CC -xar -o   libstd.a assert.o atomic-cxx.o bitset.o catalog.o codecvt.o collate.o ctype.o ctype_bits.o domain_error.o exception.o export.o facet.o file.o instance.o ios.o ios_bits.o iostore.o iostream.o iso2022.o limits.o limits_bits.o locale_bits.o locale_body.o locale_classic.o locale_combine.o locale_core.o locale_eq.o locale_global.o locale_name.o logic_error.o memattr.o memory.o messages.o mman.o num_get.o num_put.o once.o punct.o random.o range_error.o runtime_error.o setlocale.o string.o strstream.o strtol.o ti_collate.o ti_filebuf.o ti_insert_dbl.o ti_insert_int.o ti_insert_ptr.o ti_ios.o ti_istream.o ti_messages.o ti_money_get.o ti_money_put.o ti_moneypunct.o ti_num_get.o ti_num_put.o ti_numpunct.o ti_ostream.o ti_podarray.o ti_streambuf.o ti_string.o ti_stringbuf.o ti_time_get.o ti_time_put.o ti_wcollate.o ti_wfilebuf.o ti_winsert_dbl.o ti_winsert_int.o ti_winsert_ptr.o ti_wios.o ti_wistream.o ti_wmessages.o ti_wmoney_get.o ti_wmoney_put.o ti_wmoneypunct.o ti_wnum_get.o ti_wnum_put.o ti_wnumpunct.o ti_wostream.o ti_wstreambuf.o ti_wstring.o ti_wstringbuf.o ti_wtime_get.o ti_wtime_put.o time_get.o time_put.o tmpbuf.o typeinfo.o valarray.o vecbool.o version.o wcodecvt.o wctype.o 
> gencat rwstderr.cat $(TOPDIR)/src/rwstderr.msg
> gmake: Leaving directory `$(BUILDDIR)/lib'

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.