public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pilarlatiesa at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98770] New: [modules] including certain stdlib headers in the global module fragment of different modules causes conflicting global module declarations Date: Wed, 20 Jan 2021 14:36:52 +0000 [thread overview] Message-ID: <bug-98770-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98770 Bug ID: 98770 Summary: [modules] including certain stdlib headers in the global module fragment of different modules causes conflicting global module declarations Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pilarlatiesa at gmail dot com Target Milestone: --- $ /home/pililatiesa/GCC-11/bin/g++ -v Using built-in specs. COLLECT_GCC=/home/pililatiesa/GCC-11/bin/g++ Target: x86_64-pc-linux-gnu Configured with: ../gcc-master/configure --prefix=($HOME)/GCC-11 --enable-languages=c++ --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20210115 (experimental) (GCC) $ cat Tensor.ixx module; #include <cstddef> #include <iostream> export module VF.Tensor; namespace VF { export template<std::size_t d, std::size_t r1> struct TTensor { private: std::istream inline &Read(std::istream &is) { return is; } }; export template<std::size_t d> using TVector = TTensor<d, 1u>; } // VF $ cat Mesh.ixx module; #include <cstddef> #include <type_traits> export module VF.Mesh; import VF.Tensor; namespace VF { template <std::size_t d> class TPoint final : public TVector<d> {}; } $ /home/pililatiesa/GCC-11/bin/g++ -fmodules-ts -x c++ -std=c++20 -I../ -I./ Tensor.ixx Mesh.ixx -o foo In file included from /home/pililatiesa/GCC-11/include/c++/11.0.0/bits/move.h:57, from /home/pililatiesa/GCC-11/include/c++/11.0.0/bits/nested_exception.h:40, from /home/pililatiesa/GCC-11/include/c++/11.0.0/exception:148, from /home/pililatiesa/GCC-11/include/c++/11.0.0/ios:39, from /home/pililatiesa/GCC-11/include/c++/11.0.0/ostream:38, from /home/pililatiesa/GCC-11/include/c++/11.0.0/iostream:39, from Tensor.ixx:5, of module VF.Tensor, imported at Mesh.ixx:9: /home/pililatiesa/GCC-11/include/c++/11.0.0/type_traits:634:31: error: conflicting global module declaration ‘template<class ...> using __void_t = void’ 634 | template<typename...> using __void_t = void; | ^~~~~~~~ In file included from Mesh.ixx:5: /home/pililatiesa/GCC-11/include/c++/11.0.0/type_traits:634:31: note: existing declaration ‘template<class ...> using __void_t = void’ 634 | template<typename...> using __void_t = void; | ^~~~~~~~ Mesh.ixx:14:29: note: during load of binding ‘VF::TVector@VF.Tensor’ 14 | class TPoint final : public TVector<d> {}; | ^~~~~~~ Mesh.ixx:7:8: warning: not writing module ‘VF.Mesh’ due to errors 7 | export module VF.Mesh; |
next reply other threads:[~2021-01-20 14:36 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-20 14:36 pilarlatiesa at gmail dot com [this message] 2021-01-28 12:57 ` [Bug c++/98770] " cvs-commit at gcc dot gnu.org 2021-01-28 12:58 ` nathan at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-98770-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).