From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F6D23858D20; Wed, 8 Feb 2023 22:45:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F6D23858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675896349; bh=VU2fUVWzNJjGOSiF0hmurp4R/tWQooRfxGXLG12HPnM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nQpfkfMEVEmB7SmYUQWLDFCntQBLPmR45EPGr3KWfrJUU3DgAyx6OL0c1nepLZEoz 7/pfNgd7u5PyuPs6rYxq5z4V4mu3qdhpjYNxwgrBgCXPubIA0yFqJeHto7ONbDrfUy H/qudXDv9e9ugDVujh3sQ7cFM54eVsmgv748V4MY= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug pch/108732] Pre-compiled headers cannot be output to /dev/null Date: Wed, 08 Feb 2023 22:45:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: pch X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108732 --- Comment #4 from Andrew Pinski --- (In reply to Matt Hellige from comment #3) > As long as I'm updating builds, I'll switch to that invocation, thanks. >=20 > I still do think it's a little odd that in this case (and *only* in this > case?) output needs to be written to a mappable file.=20 The way PCH works is mapping files in and out for speed reasons. So it is n= ot really that odd. Even though it is not expliclty mentioned in the manual: https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Precompiled-Headers.html#Prec= ompiled-Headers The whole idea of PCH is that the file is mapped in with almost no changes = done afterwards so an exact dump of the memory from compiler can be loaded back = in without doing anything special; rather the OS handles the loading into memo= ry from the file.=