Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4832397ybg; Tue, 29 Oct 2019 13:05:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxmm4B8dHVo5TKUp9P1kxl7b76dCVPmIk1wVgPkKef6mN4lqhUmJHv0oojkunH6HKxH/02 X-Received: by 2002:a17:906:9c1:: with SMTP id r1mr5052688eje.217.1572379542901; Tue, 29 Oct 2019 13:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572379542; cv=none; d=google.com; s=arc-20160816; b=UMb7i1Oh/5KUk8CJcKe/7kCykPpYJz9O2UtF3NZ05fFw0KQMLbxixt0uYeZnUvoobp aJ+Nq2cKgbRYMGa6/t2elsxoXtBUgHS0QnBCahsfJcVaUMyEDyuZZQmcFs1OjpSqCFuQ 3OWwNrpjCw5nhXh2UDWvwmXXRpFyMFV3sbvj0SLRtCa85CJsW/TfLh5OYqcOo+Kbvs6h kkCyliBb1dxRfWLSKfMZIFxubkxH4etJIZgBZjFpNsEST44l+94dDcsZmkhLNhndE7Ua TtkOqgTQWlo2BWCL/K2iAoRHBTYikRVzDhQstrPQgrfAIYieocXGQpk5vk3gRE5epFb9 +xLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=I4ZZ/wVJJQ0guXrWMZRkvryKrerb1ReP5+TDi/d996w=; b=MxvafAhV34D8xh8ZQ1gtVKZ9+xE7vTOLmPsW5fZEu98o8GdT6veNxRQAGu8ZcdP4s/ NOe59TbA/PM7j4ItNUUtf+tMUyq5+iRR3huu9idTnbUzNzazjJdq2CLd3ZpjYJrSHuzF sMTU/KhOZMHpCPf6CiKE9HJg372ZEriOc4Jt47FB8E77bJYyUGCeBcADrcSW7KIc5/Op y7tG8YFCYI50yR33lZUuo0ysYey3IaGmq9j3UW3VUz6US87dYSoSGrA/Y+Gya2DOIOz3 g3QGP+hyPf2gkDDZhd1SrWYikCmY43jNRLmaIlrD2TZIfwFoarxiJ+mT15JVn9bBJP2Z UiNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@plus.com header.s=042019 header.b=qGlZh9wk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si12143412edv.82.2019.10.29.13.05.18; Tue, 29 Oct 2019 13:05:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@plus.com header.s=042019 header.b=qGlZh9wk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730583AbfJ2SyF (ORCPT + 99 others); Tue, 29 Oct 2019 14:54:05 -0400 Received: from avasout03.plus.net ([84.93.230.244]:55912 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732093AbfJ2SyE (ORCPT ); Tue, 29 Oct 2019 14:54:04 -0400 Received: from [10.0.2.15] ([146.198.133.39]) by smtp with ESMTPA id PWcyigzCktvkXPWcziiYf9; Tue, 29 Oct 2019 18:54:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1572375243; bh=I4ZZ/wVJJQ0guXrWMZRkvryKrerb1ReP5+TDi/d996w=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=qGlZh9wka1XHevwqmEXD49cMDJJfe+FkSQGHxa1snuKSk6S2cgjCPgidJzixQZACE wUW2kiQI1FiTjd1ob1ZeayuihK5zg+aPVmAhvEfSBCL/Lm5zkYc5W3e3zyD5G6dnw7 BZQUO7icHobzrrZFqfhzrm6FI4cFgw+k/g9UpyhRC2saG+qzples5/pDdSc/FB+o3T +EvtPc5/zBBu2vkEksa2KC4UqfCINtk+/N5ApeevynBL+EXTOrH7XT3lZnY0UFpRkt GtNCTULhBK7GtciDczTbi4mP2kN1/FtVKCsZIh1/L/LAo06NwwMSu9Eddj0cRYOat8 0JzfIf7xWiPkw== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=ePBtc0h1 c=1 sm=1 tr=0 a=1Jh3712dEPwUcX5EWi7t+w==:117 a=1Jh3712dEPwUcX5EWi7t+w==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=491Ab-Zl-TA3clIL934A:9 a=QEXdDO2ut3YA:10 X-AUTH: ramsayjones@:2500 Subject: Re: [PATCH] compiler*.h: Add '__' prefix and suffix to all __attribute__ #defines To: Luc Van Oostenryck Cc: Joe Perches , Miguel Ojeda , linux-sparse@vger.kernel.org, Andrew Morton , linux-kernel , clang-built-linux References: <7a15bc8ad7437dc3a044a4f9cd283500bd0b5f36.camel@perches.com> <19fd23e98bab65a1ee624445193bd2ed86108881.camel@perches.com> <20191028221523.vlzdk6dkcglxei6v@desk.local> <00c5ef125a4e62f538de7ddddc9d8fe7085794a3.camel@perches.com> <20191028230349.xlhm42ripxktx43y@desk.local> <61eb73ad-5c30-0005-5031-6584df72ad5f@ramsayjones.plus.com> <20191029080701.qpvscbz3xptadhbd@ltop.local> From: Ramsay Jones Message-ID: Date: Tue, 29 Oct 2019 18:54:00 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191029080701.qpvscbz3xptadhbd@ltop.local> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfDVoYw7ULPJG2gXopqFyDkmgZvbcO8oQUTiYMfxlmz6Gnd4uUsch0XW/zcYouohl3jtIkJ7OQVZAnwhkyFoc8eds9yVeMsZTsXYDLiJipbGXmrCsDCtr za5CAl/4tJyknl2EXIlMxmt+ZrMs1BCXQEdZJNpJgkUGb3yruOFNglrpSlbHwCzZuVqbv/oKFJb+Bw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/10/2019 08:07, Luc Van Oostenryck wrote: > On Tue, Oct 29, 2019 at 02:38:54AM +0000, Ramsay Jones wrote: >> On 28/10/2019 23:03, Luc Van Oostenryck wrote: >>> diff --git a/parse.c b/parse.c >>> index 4464e2667..4b0a1566c 100644 >>> --- a/parse.c >>> +++ b/parse.c >>> @@ -345,6 +345,7 @@ static struct symbol_op goto_op = { >>> >>> static struct symbol_op __context___op = { >>> .statement = parse_context_statement, >>> + .attribute = attribute_context, >> >> Hmm, so why is do we have a context_op and a __context___op? >> >>> }; >>> >>> static struct symbol_op range_op = { >>> @@ -537,6 +538,7 @@ static struct init_keyword { >>> { "while", NS_KEYWORD, .op = &while_op }, >>> { "do", NS_KEYWORD, .op = &do_op }, >>> { "goto", NS_KEYWORD, .op = &goto_op }, >>> + { "context", NS_KEYWORD, .op = &context_op }, >>> { "__context__",NS_KEYWORD, .op = &__context___op }, >> >> So, can '__context__' be used in a statement, as well as an >> attribute, while 'context' can only be used in an attribute? > > Yes, indeed. OK, so I wasn't quite as confused as I thought! ;-) > '__context__' was only parsed as a statement and 'context' > only as an attribute. But now we also want to be able to use > '__context__' as an attribute (because 'context' is not a > reserved keyword and can thus be a used defined macro). > > There is no reason, though, we should now also want to use > 'context' as a statement since it's a sparse extension. Hence > adding attribute_context to '__context___op' and keeping > 'context_op' as such (but moving them together). Thanks for the explanation. ATB, Ramsay Jones