From: Christopher Li <sparse@chrisli.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH 2/3] allow builtins to have prototype and evaluate/expand methods
Date: Wed, 8 Feb 2017 06:19:45 +0800 [thread overview]
Message-ID: <CANeU7Qno3xVT5CemAsm2R1JtLRcX=_OrpzykvfAzc16CLOf_Nw@mail.gmail.com> (raw)
In-Reply-To: <20170207213448.ah3tjuifg6iwpahg@macpro.local>
On Wed, Feb 8, 2017 at 5:34 AM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> I see roughly a way how we could do that but I'm far from being
> convinced it would be a good idea.
> The problem is not that we have one symbol per declaration, it's
> even not that we have several symbols for the same object, it's
> that we don't have a central place holding the information about
> the object. Like, for example, we can't answer something essential
> like "what is the type of this function" because we have as much
> types as we have declarations.
As far as I can tell. You can't have one single place to hold type for
every declaration. If the declaration is exactly the same, yes.
But if the declaration was done in difference scope with different
incremental declare, you need to have different version of the same
symbol due to the C specification of scoping. See my previous example.
The field "same_symbol" is for that purpose tracking the same symbol
in different declares.
> So yes, verification of the
> comptability between the declarations and consolidate them is what
> is missing.
I think in evaluate.c check_duplicates() does the verification of incompatible
declares already. I agree consolidating is missing right now.
I am open to suggestions how to fix it.
Chris
next prev parent reply other threads:[~2017-02-07 22:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-23 21:37 [PATCH 0/3] builtins expansion Luc Van Oostenryck
2017-01-23 21:37 ` [PATCH 1/3] move evaluation & expansion of builtins in a separate file Luc Van Oostenryck
2017-01-23 21:37 ` [PATCH 2/3] allow builtins to have prototype and evaluate/expand methods Luc Van Oostenryck
2017-02-07 19:49 ` Chris Li
2017-02-07 20:12 ` Luc Van Oostenryck
2017-02-07 20:26 ` Chris Li
2017-02-07 20:32 ` Christopher Li
2017-02-07 21:34 ` Luc Van Oostenryck
2017-02-07 22:19 ` Christopher Li [this message]
2017-02-12 15:03 ` Luc Van Oostenryck
2017-02-12 15:10 ` [PATCH v2 0/3] builtins expansion Luc Van Oostenryck
2017-02-12 15:10 ` [PATCH v2 1/3] move evaluation & expansion of builtins in a separate file Luc Van Oostenryck
2017-02-12 15:10 ` [PATCH v2 2/3] let identical symbols share their evaluate/expand methods Luc Van Oostenryck
2017-02-12 15:11 ` [PATCH v2 3/3] expand __builtin_bswap*() with constant args Luc Van Oostenryck
2017-02-13 1:54 ` [PATCH v2 0/3] builtins expansion Christopher Li
2017-02-12 23:35 ` [PATCH 2/3] allow builtins to have prototype and evaluate/expand methods Chris Li
2017-01-23 21:37 ` [PATCH 3/3] expand __builtin_bswap*() with constant args 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='CANeU7Qno3xVT5CemAsm2R1JtLRcX=_OrpzykvfAzc16CLOf_Nw@mail.gmail.com' \
--to=sparse@chrisli.org \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
/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).