public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99274] New: [modules] Error when compiling some system headers as modules after <iosfwd>
@ 2021-02-25 21:42 alexander.lelyakin at googlemail dot com
2021-03-13 7:15 ` [Bug c++/99274] [modules] Error compiling some system headers: "wrong number of template arguments (1, should be 2)" alexander.lelyakin at googlemail dot com
2023-06-05 13:58 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-02-25 21:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99274
Bug ID: 99274
Summary: [modules] Error when compiling some system headers as
modules after <iosfwd>
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: alexander.lelyakin at googlemail dot com
Target Milestone: ---
Some system headers cannot be compiled as a modules after you compile <ioswfd>
At least <future> and <complex>:
-----
g++ -std=c++20 -fmodules-ts -x c++-system-header iosfwd
g++ -std=c++20 -fmodules-ts -x c++-system-header future
-----
In file included from /usr/local/include/c++/11.0.1/string:43,
from /usr/local/include/c++/11.0.1/stdexcept:39,
from /usr/local/include/c++/11.0.1/system_error:41,
from /usr/local/include/c++/11.0.1/mutex:42,
from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:156:74: error: wrong number of
template arguments (1, should be 2)
156 | template<typename _CharT, typename _InIter =
istreambuf_iterator<_CharT> >
|
^
.....
----
g++ -std=c++20 -fmodules-ts -x c++-system-header iosfwd
g++ -std=c++20 -fmodules-ts -x c++-system-header complex
----
In file included from /usr/local/include/c++/11.0.1/ios:41,
from /usr/local/include/c++/11.0.1/istream:38,
from /usr/local/include/c++/11.0.1/sstream:38,
from /usr/local/include/c++/11.0.1/complex:45:
/usr/local/include/c++/11.0.1/bits/localefwd.h:156:74: error: wrong number of
template arguments (1, should be 2)
156 | template<typename _CharT, typename _InIter =
istreambuf_iterator<_CharT> >
|
^
In file included from /usr/local/include/c++/11.0.1/bits/specfun.h:45,
from /usr/local/include/c++/11.0.1/cmath:1927,
from /usr/local/include/c++/11.0.1/complex:44:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:451:11: note: provided for
‘template<class _CharT, class _Traits> class std::istreambuf_iterator’
..........
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/99274] [modules] Error compiling some system headers: "wrong number of template arguments (1, should be 2)"
2021-02-25 21:42 [Bug c++/99274] New: [modules] Error when compiling some system headers as modules after <iosfwd> alexander.lelyakin at googlemail dot com
@ 2021-03-13 7:15 ` alexander.lelyakin at googlemail dot com
2023-06-05 13:58 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-03-13 7:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99274
--- Comment #1 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> ---
Previously I have seen such message only in connection with <iosfwd>,
but it happends also without it.
Another header causing such error is <regex>:
g++ -std=c++20 -fmodules-ts -x c++-system-header iterator
g++ -std=c++20 -fmodules-ts -x c++-system-header regex
----
In file included from /usr/local/include/c++/11.0.1/locale:40,
from /usr/local/include/c++/11.0.1/regex:44:
/usr/local/include/c++/11.0.1/bits/locale_facets.h:121:31: error: wrong number
of template arguments (1, should be 2)
121 | ostreambuf_iterator<_CharT>
| ^
In file included from /usr/local/include/c++/11.0.1/algorithm:61,
from /usr/local/include/c++/11.0.1/regex:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:454:11: note: provided for
‘template<class _CharT, class _Traits> class std::ostreambuf_iterator’
454 | class ostreambuf_iterator;
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/c++/11.0.1/locale:40,
from /usr/local/include/c++/11.0.1/regex:44:
/usr/local/include/c++/11.0.1/bits/locale_facets.h:122:39: error: wrong number
of template arguments (1, should be 2)
122 | __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int
__len)
| ^
In file included from /usr/local/include/c++/11.0.1/algorithm:61,
from /usr/local/include/c++/11.0.1/regex:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:454:11: note: provided for
‘template<class _CharT, class _Traits> class std::ostreambuf_iterator’
454 | class ostreambuf_iterator;
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/c++/11.0.1/locale:40,
from /usr/local/include/c++/11.0.1/regex:44:
/usr/local/include/c++/11.0.1/bits/locale_facets.h: In function ‘int
std::__write(int, const _CharT*, int)’:
/usr/local/include/c++/11.0.1/bits/locale_facets.h:124:11: error: request for
member ‘_M_put’ in ‘__s’, which is of non-class type ‘int’
124 | __s._M_put(__ws, __len);
| ^~~~~~
/usr/local/include/c++/11.0.1/regex: At global scope:
/usr/local/include/c++/11.0.1/regex: warning: not writing module
‘/usr/local/include/c++/11.0.1/regex’ due to errors
----
g++ (GCC) 11.0.1 20210312 (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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/99274] [modules] Error compiling some system headers: "wrong number of template arguments (1, should be 2)"
2021-02-25 21:42 [Bug c++/99274] New: [modules] Error when compiling some system headers as modules after <iosfwd> alexander.lelyakin at googlemail dot com
2021-03-13 7:15 ` [Bug c++/99274] [modules] Error compiling some system headers: "wrong number of template arguments (1, should be 2)" alexander.lelyakin at googlemail dot com
@ 2023-06-05 13:58 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-06-05 13:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99274
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-06-05
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-05 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25 21:42 [Bug c++/99274] New: [modules] Error when compiling some system headers as modules after <iosfwd> alexander.lelyakin at googlemail dot com
2021-03-13 7:15 ` [Bug c++/99274] [modules] Error compiling some system headers: "wrong number of template arguments (1, should be 2)" alexander.lelyakin at googlemail dot com
2023-06-05 13:58 ` 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).