From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 1/2] builtin: add ctype for const {void,char} *
Date: Mon, 6 Nov 2017 21:16:27 +0100 [thread overview]
Message-ID: <20171106201628.98470-2-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20171106201628.98470-1-luc.vanoostenryck@gmail.com>
These types are needed to declare builtin functions without
passing by the add_pre_buffer()-tokenization-parsing phases.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
symbol.c | 4 ++++
symbol.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/symbol.c b/symbol.c
index 26906ec41..4aa7f08a9 100644
--- a/symbol.c
+++ b/symbol.c
@@ -677,6 +677,7 @@ struct symbol bool_ctype, void_ctype, type_ctype,
string_ctype, ptr_ctype, lazy_ptr_ctype,
incomplete_ctype, label_ctype, bad_ctype,
null_ctype;
+struct symbol const_ptr_ctype, const_string_ctype;
struct symbol zero_int;
@@ -743,6 +744,9 @@ static const struct ctype_declare {
{ &null_ctype, SYM_PTR, 0, &bits_in_pointer, &pointer_alignment, &void_ctype },
{ &label_ctype, SYM_PTR, 0, &bits_in_pointer, &pointer_alignment, &void_ctype },
{ &lazy_ptr_ctype, SYM_PTR, 0, &bits_in_pointer, &pointer_alignment, &void_ctype },
+
+ { &const_ptr_ctype, SYM_NODE, MOD_CONST, &bits_in_pointer, &pointer_alignment, &ptr_ctype },
+ { &const_string_ctype,SYM_NODE, MOD_CONST, &bits_in_pointer, &pointer_alignment, &string_ctype },
{ NULL, }
};
#undef MOD_LLL
diff --git a/symbol.h b/symbol.h
index 327449611..c1ef447ac 100644
--- a/symbol.h
+++ b/symbol.h
@@ -269,6 +269,7 @@ extern struct symbol bool_ctype, void_ctype, type_ctype,
string_ctype, ptr_ctype, lazy_ptr_ctype,
incomplete_ctype, label_ctype, bad_ctype,
null_ctype;
+extern struct symbol const_ptr_ctype, const_string_ctype;
/* Special internal symbols */
extern struct symbol zero_int;
--
2.14.0
next prev parent reply other threads:[~2017-11-06 20:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-06 20:16 [PATCH 0/2] make builtins more built-in Luc Van Oostenryck
2017-11-06 20:16 ` Luc Van Oostenryck [this message]
2017-11-06 20:16 ` [PATCH 2/2] builtin: make builtins more builtin Luc Van Oostenryck
2017-11-07 1:38 ` Christopher Li
2017-11-07 8:22 ` Luc Van Oostenryck
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=20171106201628.98470-2-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).