From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 023D2385702D; Wed, 11 Nov 2020 13:55:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 023D2385702D From: "jozefl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97798] New: FTB msp430-elf error: the value of '__gnu_cxx::__numeric_traits_integer<__int20>::__max' is not usable in a constant expression Date: Wed, 11 Nov 2020 13:55:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jozefl at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2020 13:55:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97798 Bug ID: 97798 Summary: FTB msp430-elf error: the value of '__gnu_cxx::__numeric_traits_integer<__int20>::__max' is not usable in a constant expression Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jozefl at gcc dot gnu.org Target Milestone: --- GCC fails to build for msp430-elf since: commit c2856ceec2e7542fe9b0bf104afeeeeb57d6996d Author: Marek Polacek Date: Thu Oct 29 15:19:51 2020 -0400 c++: Tweaks for value_dependent_expression_p. There is an error building libstdc++ for the -mlarge multilib, which uses __int20 pointers: > In file included from /home/jozef/msp430/gcc/build-msp430/msp430-elf/larg= e/libstdc++-v3/include/sstream:38, > from ../../../../../../libstdc++-v3/src/c++20/sstream-in= st.cc:30: > /home/jozef/msp430/gcc/build-msp430/msp430-elf/large/libstdc++-v3/include= /istream: In function 'std::basic_istream<_CharT, _Traits>& std::operator>>= (std::basic_istream<_CharT, _Traits>&, _CharT (&)[_Num])': > /home/jozef/msp430/gcc/build-msp430/msp430-elf/large/libstdc++-v3/include= /istream:840:26: error: non-constant condition for static assertion > 840 | static_assert(_Num <=3D __gnu_cxx::__numeric_traits::__max); > | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~ > /home/jozef/msp430/gcc/build-msp430/msp430-elf/large/libstdc++-v3/include= /istream:840:26: error: the value of '__gnu_cxx::__numeric_traits_integer<_= _int20>::__max' is not usable in a constant expression > In file included from /home/jozef/msp430/gcc/build-msp430/msp430-elf/larg= e/libstdc++-v3/include/bits/stl_algobase.h:63, > from /home/jozef/msp430/gcc/build-msp430/msp430-elf/larg= e/libstdc++-v3/include/bits/char_traits.h:39, > from /home/jozef/msp430/gcc/build-msp430/msp430-elf/larg= e/libstdc++-v3/include/ios:40, > from /home/jozef/msp430/gcc/build-msp430/msp430-elf/larg= e/libstdc++-v3/include/istream:38, > from /home/jozef/msp430/gcc/build-msp430/msp430-elf/larg= e/libstdc++-v3/include/sstream:38, > from ../../../../../../libstdc++-v3/src/c++20/sstream-in= st.cc:30: > /home/jozef/msp430/gcc/build-msp430/msp430-elf/large/libstdc++-v3/include= /ext/numeric_traits.h:78:27: note: '__gnu_cxx::__numeric_traits_integer<__i= nt20>::__max' was not initialized with a constant expression > 78 | static const _Value __max =3D __glibcxx_max(_Value); > | ^~~~~ > make[9]: *** [Makefile:550: sstream-inst.lo] Error 1 Configured with: > ../configure --target=3Dmsp430-elf --enable-languages=3Dc,c++ --disable-n= ls --disable-no-exceptions --disable-full-memory-range=