Bug 60552 - integer operation result is out of range ? -__gnu_cxx::__numeric_traits<_ValueT>::__min ^
Summary: integer operation result is out of range ? -__gnu_cxx::__numeric_traits<...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.4.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-17 11:09 UTC by Sivaprasad
Modified: 2014-03-18 00:07 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-03-17 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sivaprasad 2014-03-17 11:09:37 UTC
When I am trying to build a cpp file with the gcc compiler. I am getting the below errors:

/include/c++/4.4.3/bits/locale_facets.tcc",line 453: warning #61-D: 
       integer operation result is out of range
  	  ? -__gnu_cxx::__numeric_traits<_ValueT>::__min
  	    ^
       detected during:
            instantiation of "std::num_get< _CharT, _InIter> ::iter_type
                   std::num_get< _CharT, _InIter>
                   ::_M_extract_int(std::num_get< _CharT, _InIter>
                   ::iter_type, std::num_get< _CharT, _InIter> ::iter_type,
                   std::ios_base &, std::ios_base::iostate &, _ValueT &) const
                   [with _CharT=char, _InIter=std::istreambuf_iterator<
                   std::basic_streambuf< char, std::char_traits< char> >
                   ::char_type, std::basic_streambuf< char, std::char_traits<
                   char> > ::traits_type> , _ValueT=long]" at line 2168 of
                   "/proj/DTE_releases/9.63.0.1/cade/cade_B_tools_gcc-ppc/Linux
                   /i686/bin/../lib/gcc/powerpc-eabi/4.4.3/../../../../powerpc-
                   eabi/include/c++/4.4.3/bits/locale_facets.h"
            instantiation of "std::num_get< _CharT, _InIter> ::iter_type
                   std::num_get< _CharT, _InIter> ::do_get(std::num_get<
                   _CharT, _InIter> ::iter_type, std::num_get< _CharT,
                   _InIter> ::iter_type, std::ios_base &,
                   std::ios_base::iostate &, long &) const [with _CharT=char,
                   _InIter=std::istreambuf_iterator< std::basic_streambuf<
                   char, std::char_traits< char> > ::char_type,
                   std::basic_streambuf< char, std::char_traits< char> >
                   ::traits_type> ]" 



/include/c++/4.4.3/ext/numeric_traits.h: In copy constructor '__gnu_cxx::__numeric_traits<_Value>::__numeric_traits(const __gnu_cxx::__numeric_traits<_Value>&)':


powerpc-eabi/include/c++/4.4.3/ext/numeric_traits.h:126: error: '_Tp' was not declared in this scope

include/c++/4.4.3/ext/numeric_traits.h:126: error: '_Tp' was not declared in this scope

accum1.cpp: In function 'int accum1_test(int, char**)':
accum1.cpp:17: warning: comparison between signed and unsigned integer expressions
accum1.cpp: At global scope:
accum1.cpp:25: error: specialization of 'char* std::allocator<_Alloc>::_att_tmpl_text() const [with _Tp = char]' after instantiation
accum1.cpp:27: error: specialization of 'char* std::allocator<_Alloc>::_att_tmpl_text() const [with _Tp = wchar_t]' after instantiation
accum1.cpp:32: error: specialization of 'char* std::basic_string<_CharT, _Traits, _Alloc>::_att_tmpl_text() const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' after instantiation
accum1.cpp:33: error: specialization of 'char* std::collate<_CharT>::_att_tmpl_text() const [with _CharT = char]' after instantiation
accum1.cpp:37: error: specialization of 'char* std::collate_byname<_CharT>::_att_tmpl_text() const [with _CharT = char]' after instantiation
accum1.cpp:38: error: specialization of 'char* std::basic_streambuf<_CharT, _Traits>::_att_tmpl_text() const [with _CharT = char, _Traits = std::char_traits<char>]' after instantiation
accum1.cpp:39: error: specialization of 'char* std::numpunct<_CharT>::_att_tmpl_text() const [with _CharT = char]' after instantiation
accum1.cpp:44: error: specialization of 'char* std::numpunct_byname<_CharT>::_att_tmpl_text() const [with _CharT = char]' after instantiation
accum1.cpp:45: error: specialization of 'char* std::num_get<_CharT, _InIter>::_att_tmpl_text() const [with _CharT = char, _InIter = std::istreambuf_iterator<char, std::char_traits<char> >]' after instantiation
accum1.cpp:46: error: specialization of 'char* std::num_put<_CharT, _OutIter>::_att_tmpl_text() const [with _CharT = char, _OutIter = std::ostreambuf_iterator<char, std::char_traits<char> >]' after instantiation
accum1.cpp:47: error: specialization of 'char* std::basic_ios<_CharT, _Traits>::_att_tmpl_text() const [with _CharT = char, _Traits = std::char_traits<char>]' after instantiation
accum1.cpp:48: error: specialization of 'char* std::basic_ostream<_CharT, _Traits>::_att_tmpl_text() const [with _CharT = char, _Traits = std::char_traits<char>]' after instantiation
accum1.cpp:49: error: no member function '_att_tmpl_text' declared in 'std::basic_ostream<char, std::char_traits<char> >::sentry'
accum1.cpp:50: error: specialization of 'char* std::basic_istream<_CharT, _Traits>::_att_tmpl_text() const [with _CharT = char, _Traits = std::char_traits<char>]' after instantiation
accum1.cpp:54: error: no member function '_att_tmpl_text' declared in 'std::basic_istream<char, std::char_traits<char> >::sentry'
accum1.cpp:55: error: specialization of 'char* std::basic_iostream<_CharT, _Traits>::_att_tmpl_text() const [with _CharT = char, _Traits = std::char_traits<char>]' after instantiation
accum1.cpp:145: error: '_Tp' was not declared in this scope
accum1.cpp:145: error: template argument 1 is invalid
accum1.cpp:145: error: too many template-parameter-lists
accum1.cpp:146: error: '_Tp' was not declared in this scope
accum1.cpp:146: error: template argument 1 is invalid
accum1.cpp:146: error: too many template-parameter-lists
accum1.cpp:167: error: declaration of 'class _CharT'
accum1.cpp:167: error:  shadows template parm 'class _CharT'
accum1.cpp:167: error: declaration of 'class _Traits'
accum1.cpp:167: error:  shadows template parm 'class _Traits'
accum1.cpp:167: error: 'std::basic_ostream<_CharT, _Traits>::sentry' is not a type
accum1.cpp:167: error: too many template-parameter-lists
accum1.cpp:168: error: declaration of 'class _CharT'
accum1.cpp:168: error:  shadows template parm 'class _CharT'
accum1.cpp:168: error: declaration of 'class _Traits'
accum1.cpp:168: error:  shadows template parm 'class _Traits'
accum1.cpp:168: error: 'std::basic_ostream<_CharT, _Traits>::sentry' is not a type
accum1.cpp:168: error: too many template-parameter-lists
accum1.cpp:171: error: declaration of 'class _CharT'
accum1.cpp:171: error:  shadows template parm 'class _CharT'
accum1.cpp:171: error: declaration of 'class _Traits'
accum1.cpp:171: error:  shadows template parm 'class _Traits'
Comment 1 Jonathan Wakely 2014-03-17 11:28:21 UTC
You haven't provided the requested information requested at http://gcc.gnu.org/bugs/ - please read that before reporting bugs.

/include/c++/4.4.3/bits/locale_facets.tcc",line 453: warning #61-D: 
       integer operation result is out of range
  	  ? -__gnu_cxx::__numeric_traits<_ValueT>::__min
  	    ^

This is not an error from GCC 4.4.3, are you sure that's what you're using?

GCC 4.4.3 has been unsupported for several years, please either update to a newer release or report this to the vendor you got your compiler from.
Comment 2 Sivaprasad 2014-03-17 12:37:16 UTC
with GCC 4.6.3 also, we are facing same problems.
Comment 3 Jonathan Wakely 2014-03-17 13:24:12 UTC
4.6.3 is also unsupported, and you still haven't read http://gcc.gnu.org/bugs/
Comment 4 Jonathan Wakely 2014-03-18 00:07:21 UTC
(In reply to Sivaprasad from comment #0)
> /include/c++/4.4.3/bits/locale_facets.tcc",line 453: warning #61-D: 

I have no idea where "#61-D" comes from, that's not GCC.

> /include/c++/4.4.3/ext/numeric_traits.h: In copy constructor

That is not a proper header path, you're not showing the real output.

> '__gnu_cxx::__numeric_traits<_Value>::__numeric_traits(const
> __gnu_cxx::__numeric_traits<_Value>&)':
> 
> 
> powerpc-eabi/include/c++/4.4.3/ext/numeric_traits.h:126: error: '_Tp' was
> not declared in this scope

That is not a correct path, and _Tp is not used on line 126.

> accum1.cpp: At global scope:
> accum1.cpp:25: error: specialization of 'char*
> std::allocator<_Alloc>::_att_tmpl_text() const [with _Tp = char]' after
> instantiation

_att_tmpl_text is not a member of std::allocator, so you're doing something weird in the code you're not showing.

> accum1.cpp:32: error: specialization of 'char* std::basic_string<_CharT,
> _Traits, _Alloc>::_att_tmpl_text() const [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]' after instantiation

???

> accum1.cpp:33: error: specialization of 'char*
> std::collate<_CharT>::_att_tmpl_text() const [with _CharT = char]' after
> instantiation

???

> accum1.cpp:37: error: specialization of 'char*
> std::collate_byname<_CharT>::_att_tmpl_text() const [with _CharT = char]'
> after instantiation

???

Your code seems to be very broken.