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

--- Comment #3 from Alexander Lelyakin <alexander.lelyakin at googlemail dot 
com> ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ios
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ccomplex
----
In file included from /usr/local/include/c++/11.0.1/sstream:38,
                 from /usr/local/include/c++/11.0.1/complex:45,
                 from /usr/local/include/c++/11.0.1/ccomplex:39:
/usr/local/include/c++/11.0.1/istream: In function ‘std::basic_istream<_CharT,
_Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT
(&)[_Num])’:
/usr/local/include/c++/11.0.1/istream:840:26: error: non-constant condition for
static assertion
  840 |       static_assert(_Num <=
__gnu_cxx::__numeric_traits<streamsize>::__max);
      |                    
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/11.0.1/istream:840:26: error: the value of
‘__gnu_cxx::__numeric_traits_integer<long int>::__max’ is not usable in a
constant expression
In file included from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:63,
                 from /usr/local/include/c++/11.0.1/bits/char_traits.h:39,
                 from /usr/local/include/c++/11.0.1/string_view:41,
of module /usr/local/include/c++/11.0.1/string_view, imported at
/usr/local/include/c++/11.0.1/bits/basic_string.h:48,
        included from /usr/local/include/c++/11.0.1/string:55,
                 from /usr/local/include/c++/11.0.1/bits/locale_classes.h:40,
                 from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
                 from /usr/local/include/c++/11.0.1/ios:42,
of module /usr/local/include/c++/11.0.1/ios, imported at
/usr/local/include/c++/11.0.1/istream:38,
        included from /usr/local/include/c++/11.0.1/sstream:38,
                 from /usr/local/include/c++/11.0.1/complex:45,
                 from /usr/local/include/c++/11.0.1/ccomplex:39:
/usr/local/include/c++/11.0.1/ext/numeric_traits.h:75:27: note:
‘__gnu_cxx::__numeric_traits_integer<long int>::__max’ was not initialized with
a constant expression
   75 |       static const _Value __max = __is_signed
      |                           ^~~~~
/usr/local/include/c++/11.0.1/ccomplex: At global scope:
/usr/local/include/c++/11.0.1/ccomplex: warning: not writing module
‘/usr/local/include/c++/11.0.1/ccomplex’ due to errors
----
g++ (GCC) 11.0.1 20210329 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reply via email to