This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] lang_decl selector & decomposition
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 31 May 2017 19:05:45 +0200
- Subject: Re: [C++ PATCH] lang_decl selector & decomposition
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C3CAAC04B929
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C3CAAC04B929
- References: <21a65173-8939-e6d8-0fa5-278d7a64ec3d@acm.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, May 31, 2017 at 12:54:24PM -0400, Nathan Sidwell wrote:
> This patch reworks how decl_decomposition is marked. With the new
> lang_decl_decomp struct, the selector grew another used but -- which
> affected me on the modules branch. however, we can use that use selector
> value in place of the decompostion_p bitfield.
>
> This patch makes that change, but it also replaces the use of magic
> constants [0-4] with an enumeration.
>
> Rather than have retrofit_lang_decl know about decomposition conversion, I
> broke out a fit_decomposition_lang_decl function for just that purpose.
>
> The other change I made is breaking out new maybe_add_lang_decl_raw and
> maybe_add_lang_type_raw functions. On the modules branch I need to recreate
> the lang_decl/lang_type nodes, but based on an untrustworth binary file. So
> we don't want to assert if they're called incorrectly. I was going to leave
> that on the modules branch, until Jakub altered retrofit_lang_decl, and I
> had a more complicated merge.
>
> Jakub, I discovered that fit_decomposition_lang_decl can get called
> repeatedly on the same var but with different base vars. Is that expected?
That is weird, that sounds like a bug somewhere? Which testcase is it on?
> 2017-05-31 Nathan Sidwell <nathan@acm.org>
>
> * cp-tree.h (lang_decl_slector): New enum.
selector?
Jakub