From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id C868B3858D35 for ; Wed, 10 Nov 2021 21:30:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C868B3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 8P5c1dEGOP9HeRw3oMQFJPhLZdOUBMwraQyXEhDNDw2B4NlPAAtubiNY6SxaQAh+K7O52OjkuU UDc8aK3KTFt/P5OtfmvlPm19bTD3emE9zW4dtuHJh9sF/cajSgqbIguSO5wAK3p8OO1lizbZNI iUSRaYAyc/8R40dFAhtlCiQjvxedHiHvMJQmFSIuSzGaleQh3ml0mUIxbnNFm8DpC1VS/k2ELY vFBb0YiUoPqqm0FuFOIee8TO9kLGzR7MMJ1iTnibre9lUS1dhOJtFxq+D3QgpX6JQNv4k31a2K IdWvtAY3Pb6p5+RYBYyPPjSk X-IronPort-AV: E=Sophos;i="5.87,224,1631606400"; d="scan'208";a="68335598" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 10 Nov 2021 13:30:33 -0800 IronPort-SDR: i06/PlJm3re7cxkMwtVh/+1QqughDAC6pwhurg88tESKT5zEmvMhO/Qi5OKvOvcpyhmCxDIsiX F9IuEZCbjNSSxsJxZVnZDQ4hQR0+ANnhHO1Iu/0JPxHjNFwRi72wZ/LPeJx1qbDRVyib5NEWBs mnVvnUxiVs8DIv6BvL+6RuiRR1xtWepzS7dO8Ji1Xy1OTqfg0YLmKCQG2ZUX200fmJHQj+okWy b9qqiep67KPFFLr3jpolx8SqjAMLGZJP78gkVo6XYaaP35Nd8sbhOELIWdwTuPtPkwmeqimVHF WEY= Date: Wed, 10 Nov 2021 21:30:29 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Tobias Burnus CC: gcc-patches , Jakub Jelinek Subject: Re: [Patch] libcpp: Fix _Pragma in #__VA_ARGS__ [PR103165] In-Reply-To: <5e77a918-1943-03dc-5bb7-20eebfc61226@codesourcery.com> Message-ID: References: <5e77a918-1943-03dc-5bb7-20eebfc61226@codesourcery.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3116.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2021 21:30:36 -0000 On Wed, 10 Nov 2021, Tobias Burnus wrote: > Disclaimer: While this patch does a step into the right direction, > it probably does help with any of the other _Pragma issues. Neither > with 'gcc -E' when the pragma wasn't registered (still expanded too > early) nor with the 'GCC diagnostic' issues in general as there the > input_location is used to decide when to pop - and depending on the > column numbers, this may or may not work. And fully correct stringization of _Pragma should respect the spelling of the preprocessing tokens (of the string-literal preprocessing token, that is; spelling variations for the other preprocessing tokens aren't possible here) and the presence or absence of whitespace between them. _Pragma("foo") _Pragma ("foo") _Pragma("foo" ) _Pragma(L"foo") _Pragma ( "foo" ) (for example) should all have their spelling preserved by stringization (but any nonempty white space sequence becomes a single space). -- Joseph S. Myers joseph@codesourcery.com