Re: [PATCH 2/3] allow builtins to have prototype and evaluate/expand methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 8, 2017 at 5:34 AM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux