From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from codesynthesis.com (codesynthesis.com [188.40.148.39]) by sourceware.org (Postfix) with ESMTPS id 3C5903858C2C for ; Mon, 25 Apr 2022 09:20:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3C5903858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesynthesis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=codesynthesis.com Received: from brak.codesynthesis.com (unknown [105.186.193.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by codesynthesis.com (Postfix) with ESMTPSA id 6291B603F5; Mon, 25 Apr 2022 09:20:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codesynthesis.com; s=mail1; t=1650878417; bh=kKlin2IKRHumheZBKxBRIddQHCKDadz/e9A4382NqW0=; h=Date:From:To:Subject:Message-ID:MIME-Version:From; b=msF+l3TlukltcbA7bWTh/8qFhGaI7sYb6pBpXUlPuV8itW34n2S9e///GgFXKQ3vK vsX/aIDTEXU47weG/hEdLSdoDW6fGXk4EOsaHkGANAXhb9JKpRccipqJrqK9aAAg57 b7gyXBuEOTzCKf+KgrA3ir55+WSOdi1Cyj3elBl/lx8K+gidvfWH7Rs9y6jIt16Giz jUSGoK+EKJ5Cr4ivV1aybsbjf9kr59jjz/n5S6aXdIRbaOB1YdmXCiTdHH6rQDr2// 8cMBitb0PRU7q1bYfBCC2kOGWHjRSl+YozYe/83+O+VM7x7+wjcZKqRRuykYx+7Wma h/sjAqJJjauew== Received: by brak.codesynthesis.com (Postfix, from userid 1000) id AC9541A802AE; Mon, 25 Apr 2022 11:20:13 +0200 (SAST) Date: Mon, 25 Apr 2022 11:20:13 +0200 From: Boris Kolpackov To: Iain Sandoe Cc: Ben Boeckel , gcc@gcc.gnu.org Subject: Re: [modules] Preprocessing requires compiled header unit modules Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Code Synthesis User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2022 09:20:20 -0000 Iain Sandoe writes: > The standard has the concept of an “importable header” which is > implementation-defined. But it must contain all the C++ library headers: https://eel.is/c++draft/headers#4 > We could choose that only headers that are self-contained (i.e. unaffected > by external defines) are “importable” (thus the remaining headers would > not be eligible for include-translation). That would mean that we could > rely on processing any import by processing the header it is created from? > Perhaps that is too great a restriction and we need to be more clever. It will also be hard to determine whether the header (or any header that it includes) satisfies this condition. You would probably want it to be "meaningfully self-contained" (since pretty much every header is not self-contained with regards to include guards) which I think will be hard to automate.