From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound-ss-761.bluehost.com (outbound-ss-761.bluehost.com [74.220.211.250]) by sourceware.org (Postfix) with ESMTPS id 45D753858434 for ; Thu, 18 May 2023 13:25:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 45D753858434 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mad-scientist.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mad-scientist.net Received: from cmgw14.mail.unifiedlayer.com (unknown [10.0.90.129]) by progateway8.mail.pro1.eigbox.com (Postfix) with ESMTP id 8F98E10043B26 for ; Thu, 18 May 2023 13:25:06 +0000 (UTC) Received: from box5922.bluehost.com ([162.241.30.80]) by cmsmtp with ESMTP id zdcwpogKWZZlczdcwpC5f9; Thu, 18 May 2023 13:25:06 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=F56SyotN c=1 sm=1 tr=0 ts=64662732 a=u+82WREdhvUKZ7QTvcqjvQ==:117 a=u+82WREdhvUKZ7QTvcqjvQ==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=P0xRbXHiH_UA:10:nop_rcvd_month_year a=3EOfIcITIxQA:10:endurance_base64_authed_username_1 a=MdYwuMufeoBonfWUiAIA:9 a=QEXdDO2ut3YA:10:nop_charset_2 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mad-scientist.us; s=default; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:Reply-To:From:Subject: Message-ID:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jHWoBkcpCgYBZfdARJUmyxDb36KiY2U0vKgxWpkH1ms=; b=lOxDqodE4N3F6sIRA/J7fO5EQx TpqZMwzM776TI4YL1MyQyxT2ZxXwmuG9aa3HQnFyLDiMakD9lbasyYHpkAUJVjVgltWmmvmqriAJE oycaZzGx6n8yOUKt1V8MUw9EC; Received: from [160.231.0.90] (port=17572 helo=llin-psh13-dsa.dsone.3ds.com) by box5922.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pzdcv-002tuh-VV; Thu, 18 May 2023 07:25:06 -0600 Message-ID: <1ed347e35c0c08c48b67d862a9028a5d8b69cdac.camel@mad-scientist.net> Subject: Re: LSP based on GCC From: Paul Smith Reply-To: paul@mad-scientist.net To: Ben Boeckel Cc: Eli Zaretskii , gcc@gcc.gnu.org Date: Thu, 18 May 2023 09:25:04 -0400 In-Reply-To: <20230517223850.GB291350@farprobe> References: <83a5y3xcai.fsf@gnu.org> <20230517223850.GB291350@farprobe> Organization: Please remain calm--I may be mad but I am a professional! Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.1 (by Flathub.org) MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5922.bluehost.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mad-scientist.net X-BWhitelist: no X-Source-IP: 160.231.0.90 X-Source-L: No X-Exim-ID: 1pzdcv-002tuh-VV X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (llin-psh13-dsa.dsone.3ds.com) [160.231.0.90]:17572 X-Source-Auth: paul@mad-scientist.us X-Email-Count: 1 X-Source-Cap: bWFkc2NpZTE7bWFkc2NpZTE7Ym94NTkyMi5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 2023-05-17 at 18:38 -0400, Ben Boeckel wrote: > > egregious example I'm aware of is that they look for GCC-named > > precompiled headers (.gch), even though the Clang PCH format is > > completely different.=C2=A0 So if Clang (and the LSP servers built on > > it) find a .gch header file they will try to read it, fail, and > > give an error.=C2=A0 I filed a bug about this in 2019 but it's been > > ignored. > >=20 > > This means you need to modify your LSP server arguments to omit any > > PCH compiler command line arguments; for environments based on > > auto-generated definitions like compile_commands.json this is > > frustrating. >=20 > FWIW, this is only going to get worse with C++ modules. There's no reason it should. Of course the right answer is to tell people to fix their build systems and if they want to use a different compiler AND use PCH, they use the appropriate suffix for that compiler. But even if you don't want to do that the fix in this case is trivial. I even sent a patch (although since I don't know the clang code there's no doubt that it was not done "the right way" and needed to be massaged), they just never cared about it. The GCC PCH files use a special 4-byte prefix in every file; all you have to do in clang is, if you find a .gch file open the file and read the first 4 bytes and if it's a real GCC PCH file you ignore it and if it's actually a Clang PCH with a malformed name you complain bitterly and dump core.... er, I mean, you read it silently as if it had the right name. One would hope that, if the GCC module files have a similar compiler- specific format (I'm not too familiar with modules) they also use a similar magic number at the beginning of the file. But anyway this is losing the thread of Eli's hopeful request.