This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PLUGIN] Fix PLUGIN_FINISH_TYPE
- From: Romain Geissler <romain dot geissler at gmail dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: Dodji Seketeli <dodji at seketeli dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 22 Sep 2011 16:29:34 +0200
- Subject: Re: [PLUGIN] Fix PLUGIN_FINISH_TYPE
- References: <4E6DBC5F.6070408@st.com> <m3littkdz4.fsf@seketeli.org> <CAF+LTefkNpP-g0_30w75OxoatD3GWa+Os+VsBFkg0gN4R-=+xQ@mail.gmail.com> <m3hb4hka5u.fsf@seketeli.org> <4E6F1B1C.9090404@st.com> <CAF+LTedhP8RsX6MjxgXOE_60SxfvLJk=rMiWxt4FvvY1+=d6QA@mail.gmail.com> <m3y5xgzoem.fsf@seketeli.org> <4E7B43AE.6090007@google.com>
Le 22 sept. 2011 à 16:18, Diego Novillo a écrit :
> On 11-09-22 09:40 , Dodji Seketeli wrote:
>> Romain Geissler<romain.geissler@gmail.com> a écrit:
>>
>>> I tried to fix PLUGIN_FINISH_DECL as well to include typedefs in C++.
>>>
>>> The followings does not currently trigger the PLUGIN_FINISH_DECL
>>> (or not in all cases), but should them ?
>>> - function parameters (in the function prototype)
>>> - definition (with a function body) of a top-level function (while the exact
>>> same function definition enclosed in a class definition will trigger
>>> PLUGIN_FINISH_DECL)
>>> - label declaration
>>> - constants defined by enums
>>> - namespace
>>
>> Indeed. finish_decl is not called in those cases. As to if the
>> PLUGIN_FINISH_DECL event should be emitted for those, I'd say yes, at
>> least if I believe what the description in plugin.def says:
>>
>> /* After finishing parsing a declaration. */
>> DEFEVENT (PLUGIN_FINISH_DECL)
>>
>> But I'd rather ask what the maintainers think about it.
>>
>> Jason, Diego?
>
> Yes, those events should trigger a PLUGIN_FINISH_DECL call.
Ok, i've already implemented it in the C front-end. I'll post the whole patch soon.
Romain