From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 412AE386100A; Sat, 6 Mar 2021 10:08:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 412AE386100A From: "alexander.lelyakin at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files Date: Sat, 06 Mar 2021 10:08:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: alexander.lelyakin at googlemail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: nathan at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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: Sat, 06 Mar 2021 10:08:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99227 Alexander Lelyakin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexander.lelyakin@googlema | |il.com --- Comment #1 from Alexander Lelyakin --- Just want to express my current understanding of situation. Here: https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Modules.html#C_002b_002b-Mod= ules is stated: "The Standard Library is not provided as importable header units. If you wa= nt to import such units, you must explicitly build them first. If you do not do this with care, you may have multiple declarations, which the module machin= ery must merge=E2=80=94compiler resource usage can be affected by how you parti= tion header files into header units." Any header file in "/usr[/local]/include/c++/11[.0.1]" can be precompiled a= s a header module like: ---- g++ -std=3Dc++20 -fmodules-ts -x c++-system-header iostream ---- And can be successfully used as: ---- import ; int main() { std::cout<<"Hello\n"; return 0; } ---- g++ -std=3Dc++20 -fmodules-ts test.c++ ---- However if you will compile more than one header into the same 'gcm.cache' directory, you will receive various compiler errors depending of order of compilation of headers. Currently there is no way to compile all headers. Longest sequence i have s= een so far was 35 headers, shortest - just 2. This meta bug will accumulate bug reports discovered during attempts to precompile system headers.=