This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Hide __for_{range,begin,end} symbols (PR c++/85515)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jason Merrill <jason at redhat dot com>, nathan at acm dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 3 Jul 2018 13:24:28 +0200
- Subject: Re: [C++ PATCH] Hide __for_{range,begin,end} symbols (PR c++/85515)
- References: <20180703074701.GY7166@tucnak> <CAFiYyc2bWEfF7486TS=rxJDfh-YymOsVF_ybmQaSw2TG4QshyA@mail.gmail.com> <20180703094321.GZ7166@tucnak> <CAFiYyc2ph+ihgcvQ3TH9qjiHuzVNP+3eT_fvfXSF36gfAFFCWg@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jul 03, 2018 at 11:58:31AM +0200, Richard Biener wrote:
> On Tue, Jul 3, 2018 at 11:43 AM Jakub Jelinek <jakub@redhat.com> wrote:
> >
> > On Tue, Jul 03, 2018 at 11:34:51AM +0200, Richard Biener wrote:
> > > Can we make them DECL_ARTIFICIAL and/or make name-lookup never
> >
> > They are DECL_ARTIFICIAL already.
> >
> > > lookup DECL_ARTIFICIAL vars instead?
> >
> > Not sure about that, will try to gather some statistics on how often we
> > rely on name-lookup of DECL_ARTIFICIALs.
>
> Hmm, we might indeed. At least we should make sure those
> cases never have valid identifiers? Or is the implementation
At least __FUNCTION__, __PRETTY_FUNCTION__, __func__ are all local
VAR_DECLs with DECL_ARTIFICIAL that need to be found by name lookup
(so far gathered stats just show __FUNCTION__ in lookup_name_real_1).
Jakub