Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4053072ybg; Tue, 29 Oct 2019 01:10:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzP3Z5zO5t2vxjhAjaE0AUOBADEwqoT4O+SkPuZwDmAvytMR+gYLLnMOmBqwhjFekfr7M6Y X-Received: by 2002:a17:906:c836:: with SMTP id dd22mr1981364ejb.178.1572336651638; Tue, 29 Oct 2019 01:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572336651; cv=none; d=google.com; s=arc-20160816; b=HU/RybM6YPE5VYwJ5rXYoW0v9M+Cj7ce0M5ylByry6San1jSWZT5NKezOudAOBbDvj ik4kI1xkXWVje/5Wf6UHueCv7EIIJx5nLsxE2CYa5qbalFkUg7yR/07Td3LXj3EWzFyC rFr0FD7w2KVNgvL/pxzsNNzfSEKxE3Gt88Q7YKgsXtADFfsyU1CCxPqPp7o+j0sD2pAF aqQ308exlfsGc/hQKHgh5rmSHx8FPMQASHP+dCic8cx5tr8bItfB1riIlGzJNolR9TWB xEco5YVmTk8iLxrqtO+I0/EwLKBPpkA1vcRIbIXm/5vJ6oEoSk6LT7GmshxcYuhJV5pC Dqcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GfXU1iwRgOcekEGBFraoPf4Q3S7itjMXcEa/+TYa5iQ=; b=EpmZNLcN1ApqLKVoVd74sYEI1BIlrIdCnyScM/ViWDcEg4Cf+1HTscHb0AyVgNSWKH NOIenHvGRpr//0fbHVx3LXvRl9zIP3RMIk0rpkO8pYFNthZSabaFFVLTmP0Ap2BFXAKz 5N2q3NA6KC7lg1U1fi7N/XWxZ2qwkBG7B68W9kVGRaamvyS6qWCxd/70w+GmzNe13k+r v+MIka2n4CWAidMQGlTyLnlRbSF9F+gZu4HkErQ8Zn+z1gtvN9NXyyK/EI9qsuFj6cvT yQWn2LE9nvLPgVclYK/WuvYFnEFoYOT1B7f/k0s9MGIiCLLu9yF6bRmVqxxRoMADkJbO yjcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sqhQDfcD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b19si7123922eje.396.2019.10.29.01.10.28; Tue, 29 Oct 2019 01:10:51 -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=@gmail.com header.s=20161025 header.b=sqhQDfcD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728637AbfJ2IHG (ORCPT + 99 others); Tue, 29 Oct 2019 04:07:06 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44120 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726246AbfJ2IHG (ORCPT ); Tue, 29 Oct 2019 04:07:06 -0400 Received: by mail-wr1-f68.google.com with SMTP id z11so12487337wro.11; Tue, 29 Oct 2019 01:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GfXU1iwRgOcekEGBFraoPf4Q3S7itjMXcEa/+TYa5iQ=; b=sqhQDfcDyYknLPZL9eGIlv4PJfvAw+LP1NkwTn3IgkDJzjVpzmxyzW7JFEl4rLbo9Y /R2X8JAiBJwH/jg+sveDNJujfhQR79QDlqW75iHGJoJHRH+oVcmeA2hcEGkHnnQC1TS5 Ez9Kh2Pn+UrfGVJesdrvpHCWpBOTLXCDqrGidoRHNad49mbdnYuqeI2eMJvPQEvL21Il ia4o/uD52xrnG0H7X9zxbA78YsBcC9CNRBu6Jr412ivrS7kNAyEzmAwgfhQr2tUus+hL TewCCGy1mgX9tlFUUSSqQHSQEQ7FFg8/QBuEo3Wp0ayRJd2JISSXMFZYsBCObiTkau0m 11zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GfXU1iwRgOcekEGBFraoPf4Q3S7itjMXcEa/+TYa5iQ=; b=JJCulrNaS0Y04IHwA2aWhiZRZYOSQKhOTHVOlsgYXrWtkudH0hjYSZbQf+xg6YtEvM 0/FR0+oniEOu2z0oI3VofUKUHvJcr/s24uUlr9TfI5/eFOOwf36mAVOLK3rxyW7qKGnY EBkiHKntJdotqe0jNrsePSiqlxmX94clhceKG1eHmp49onm/RCX1Jj1NvEQJatytR2IL HHZKcuCs8IXZxMhIXaBTJL5hi9raKeYhKnZXMKKweZJCDWDyWOzIPUFbZoma9Tk2gBXi FhKS/jawxqspXtWpST6Wmd2J9may73NyPmH9RH3BFIf1s7pi80AspwUaJUZdJzicqoDu bLAQ== X-Gm-Message-State: APjAAAVG81QtO2CF/pcN8GD83Z7hAsDrWjhZW+kxNCXiA/V/CIsxTeKU axZhZjZR05/BUF8yg/PQOV0= X-Received: by 2002:a5d:4047:: with SMTP id w7mr18366744wrp.270.1572336423968; Tue, 29 Oct 2019 01:07:03 -0700 (PDT) Received: from ltop.local ([2a02:a03f:40ac:ce00:c1a7:4ac0:2d11:a4f8]) by smtp.gmail.com with ESMTPSA id o15sm13468325wrv.76.2019.10.29.01.07.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2019 01:07:03 -0700 (PDT) Date: Tue, 29 Oct 2019 09:07:01 +0100 From: Luc Van Oostenryck To: Ramsay Jones Cc: Joe Perches , Miguel Ojeda , linux-sparse@vger.kernel.org, Andrew Morton , linux-kernel , clang-built-linux Subject: Re: [PATCH] compiler*.h: Add '__' prefix and suffix to all __attribute__ #defines Message-ID: <20191029080701.qpvscbz3xptadhbd@ltop.local> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61eb73ad-5c30-0005-5031-6584df72ad5f@ramsayjones.plus.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. '__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). -- Luc