On Mon, May 29, 2017 at 8:11 AM, Nathan Sidwell <nat...@acm.org> wrote:
> Currently bindings have two slots, a 'value' slot for the regular binding,
> and a 'type' slot for the struct name binding, which is only used when the
> value slot is holding something else.  for instance:
>
> struct foo {...} foo;
>
> The value slot will be a VAR_DECL, and the type slot an artificial
> TYPE_DECL.
>
> The type slot is very rarely non-null, because such code use is terribly
> confusing.  But as the name suggests, it's needed because of the C library's
> definition:
>
>   struct stat {...};
>   int stat (const char *, struct stat *);
>
> This patch changes the representation for namespace bindings, so we only use
> one slot, and if the stat hack is needed, it contains an OVERLOAD that is
> marked with LOOKUP_P (such overloads cannot otherwise appear in a binding).
> In that case the TYPE holds the TYPE_DECL and the FUNCTION holds the value
> binding.
>
> This patch doesn't change the use of cxx_binding, so the underlying accessor
> find_namespace_slot simply returns the address of the value field.  (The
> next patch will remove cxx_binding for namespaces.)
>

This caused:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80915


-- 
H.J.

Reply via email to