public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101126] New: Enabling modules suppresses creation of precompiled headers
@ 2021-06-18 15:41 overlord624 at gmail dot com
  0 siblings, 0 replies; only message in thread
From: overlord624 at gmail dot com @ 2021-06-18 15:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101126
           Summary: Enabling modules suppresses creation of precompiled
                    headers
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: overlord624 at gmail dot com
  Target Milestone: ---

The output of a precompiled header is suppressed if modules are enabled via
-fmodules-ts. This can be reproduced with the following invocation using any
valid input:
g++-11 -x c++-header -std=c++20 -fmodules-ts -o header.hpp.gch header.hpp

As described in the manual, -fmodules-ts implicitly sets -fmodule-header when
the input is a header file which results in the creation of a compiled header
unit in the module cache and causes the output parameter to be silently ignored
as a side effect.

-----
$ g++-11 -v
Using built-in specs.
COLLECT_GCC=g++-11
COLLECT_LTO_WRAPPER=/media/extra/libexec/gcc/x86_64-pc-linux-gnu/11.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /media/extra/sources/gcc/configure --host=x86_64-pc-linux-gnu
--prefix=/media/extra --disable-multilib --enable-threads --enable-tls
--enable-languages=c,c++ --disable-nls
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.1 20210402 (experimental) (GCC)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-18 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 15:41 [Bug c++/101126] New: Enabling modules suppresses creation of precompiled headers overlord624 at gmail dot com

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).