From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Christopher Li <sparse@chrisli.org>
Cc: Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: [PATCH 01/10] Add the __restrict__ keyword
Date: Mon, 04 Aug 2014 19:32:50 +0100 [thread overview]
Message-ID: <53DFD1D2.5050600@ramsay1.demon.co.uk> (raw)
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
ident-list.h | 2 +-
parse.c | 3 ++-
validation/reserved.c | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ident-list.h b/ident-list.h
index c0fc18f..d5a145f 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -86,7 +86,7 @@ IDENT(stdcall); IDENT(__stdcall__);
IDENT(fastcall); IDENT(__fastcall__);
IDENT(dllimport); IDENT(__dllimport__);
IDENT(dllexport); IDENT(__dllexport__);
-IDENT(restrict); IDENT(__restrict);
+IDENT(restrict); IDENT(__restrict); IDENT(__restrict__);
IDENT(artificial); IDENT(__artificial__);
IDENT(leaf); IDENT(__leaf__);
IDENT(vector_size); IDENT(__vector_size__);
diff --git a/parse.c b/parse.c
index 55a57a7..9767e59 100644
--- a/parse.c
+++ b/parse.c
@@ -435,6 +435,7 @@ static struct init_keyword {
/* Ignored for now.. */
{ "restrict", NS_TYPEDEF, .op = &restrict_op},
{ "__restrict", NS_TYPEDEF, .op = &restrict_op},
+ { "__restrict__", NS_TYPEDEF, .op = &restrict_op},
/* Storage class */
{ "auto", NS_TYPEDEF, .op = &auto_op },
@@ -1553,7 +1554,7 @@ static struct token *abstract_array_declarator(struct token *token, struct symbo
token = abstract_array_static_declarator(token, &has_static);
- if (match_idents(token, &restrict_ident, &__restrict_ident, NULL))
+ if (match_idents(token, &restrict_ident, &__restrict_ident, &__restrict___ident, NULL))
token = abstract_array_static_declarator(token->next, &has_static);
token = parse_expression(token, &expr);
sym->array_size = expr;
diff --git a/validation/reserved.c b/validation/reserved.c
index caacd21..e5d7af8 100644
--- a/validation/reserved.c
+++ b/validation/reserved.c
@@ -30,6 +30,7 @@ reserved.c:8:12: error: Trying to use reserved word '__const' as identifier
reserved.c:9:12: error: Trying to use reserved word '__const__' as identifier
reserved.c:10:12: error: Trying to use reserved word 'restrict' as identifier
reserved.c:11:12: error: Trying to use reserved word '__restrict' as identifier
+reserved.c:12:12: error: Trying to use reserved word '__restrict__' as identifier
reserved.c:13:12: error: Trying to use reserved word 'typedef' as identifier
reserved.c:14:12: error: Trying to use reserved word '__typeof' as identifier
reserved.c:15:12: error: Trying to use reserved word '__typeof__' as identifier
--
2.0.0
next reply other threads:[~2014-08-04 18:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 18:32 Ramsay Jones [this message]
2014-08-06 9:19 ` [PATCH 01/10] Add the __restrict__ keyword Christopher Li
2014-08-06 15:21 ` Ramsay Jones
[not found] ` <CANeU7Qm_pUe55OY0+Nh9OS=ZN5NqFytkB3CaJMTZZOvPqtK7nw@mail.gmail.com>
2014-08-07 3:04 ` Fwd: " Christopher Li
2014-08-07 20:02 ` Ramsay Jones
2014-08-08 11:13 ` Ramsay Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53DFD1D2.5050600@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox