public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2020-11-11 13:55 jozefl at gcc dot gnu.org
  2020-11-11 14:38 ` [Bug c++/97798] " mpolacek at gcc dot gnu.org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: jozefl at gcc dot gnu.org @ 2020-11-11 13:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97798

            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 <polacek@redhat.com>
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/large/libstdc++-v3/include/sstream:38,
>                  from ../../../../../../libstdc++-v3/src/c++20/sstream-inst.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 <= __gnu_cxx::__numeric_traits<streamsize>::__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/large/libstdc++-v3/include/bits/stl_algobase.h:63,
>                  from /home/jozef/msp430/gcc/build-msp430/msp430-elf/large/libstdc++-v3/include/bits/char_traits.h:39,
>                  from /home/jozef/msp430/gcc/build-msp430/msp430-elf/large/libstdc++-v3/include/ios:40,
>                  from /home/jozef/msp430/gcc/build-msp430/msp430-elf/large/libstdc++-v3/include/istream:38,
>                  from /home/jozef/msp430/gcc/build-msp430/msp430-elf/large/libstdc++-v3/include/sstream:38,
>                  from ../../../../../../libstdc++-v3/src/c++20/sstream-inst.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<__int20>::__max' was not initialized with a constant expression
>    78 |       static const _Value __max = __glibcxx_max(_Value);
>       |                           ^~~~~
> make[9]: *** [Makefile:550: sstream-inst.lo] Error 1

Configured with:
> ../configure --target=msp430-elf --enable-languages=c,c++ --disable-nls --disable-no-exceptions --disable-full-memory-range

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-11-13 15:30 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 13:55 [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 jozefl at gcc dot gnu.org
2020-11-11 14:38 ` [Bug c++/97798] " mpolacek at gcc dot gnu.org
2020-11-11 14:56 ` jozefl at gcc dot gnu.org
2020-11-11 15:26 ` mpolacek at gcc dot gnu.org
2020-11-11 15:51 ` mpolacek at gcc dot gnu.org
2020-11-11 18:37 ` mpolacek at gcc dot gnu.org
2020-11-12  0:03 ` redi at gcc dot gnu.org
2020-11-12  0:36 ` [Bug libstdc++/97798] " redi at gcc dot gnu.org
2020-11-12  0:38 ` redi at gcc dot gnu.org
2020-11-12 10:00 ` jozefl at gcc dot gnu.org
2020-11-12 12:11 ` cvs-commit at gcc dot gnu.org
2020-11-12 12:13 ` redi at gcc dot gnu.org
2020-11-12 12:30 ` jozefl at gcc dot gnu.org
2020-11-12 14:27 ` redi at gcc dot gnu.org
2020-11-12 16:06 ` jozefl at gcc dot gnu.org
2020-11-12 17:43 ` redi at gcc dot gnu.org
2020-11-12 19:31 ` jozefl at gcc dot gnu.org
2020-11-12 19:32 ` redi at gcc dot gnu.org
2020-11-13 13:24 ` redi at gcc dot gnu.org
2020-11-13 13:49 ` jozefl at gcc dot gnu.org
2020-11-13 14:52 ` cvs-commit at gcc dot gnu.org
2020-11-13 14:55 ` cvs-commit at gcc dot gnu.org
2020-11-13 14:57 ` redi at gcc dot gnu.org
2020-11-13 15:12 ` jozefl at gcc dot gnu.org
2020-11-13 15:30 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).