From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8E82D3858C50; Wed, 8 Feb 2023 21:59:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E82D3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675893574; bh=p+rZfwnM1+PgrUsJtNeJt+Ahnx5msbTE+fdNUtk5/Bo=; h=From:To:Subject:Date:From; b=JqizN4msHN3oUbitGrkAJ8tf0YqPAjbPntMk2Hz0fNEKehzogjQeC4C3/7E6Sg+dc tkEgvA7t8wFyr/lYwA/JkL8QovkStJ07bPQlThAisxs1yhTZflPmkZZjjUIP6wRfVW itNwZ7BobHjq58S7ocWqNYwJHcmyL1xwz7PL9uHk= From: "matt at immute dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108732] New: Pre-compiled headers cannot be output to /dev/null Date: Wed, 08 Feb 2023 21:59:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: matt at immute dot net 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 108732 Summary: Pre-compiled headers cannot be output to /dev/null Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: matt at immute dot net Target Milestone: --- with GCC 12, the following command fails with a fairly obscure error: $ gcc12.2.0 -c foo.h -o /dev/null foo.h:1: fatal error: cannot write PCH file: required memory segment unavailable compilation terminated. This also fails when invoked via g++. It works fine if the output is a norm= al file, and it always worked with previous GCC versions, so this is a pretty surprising change. This may seem like a strange thing to want to do, but I maintain a number of builds that do similar invocations to verify that each header file is self-contained. Either way, I think it would be best to fix it, or if that's not possible, = it would be nice to improve the error message at the very least.=