This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing


Do I need to do anything else to get this patch into gcc?

On 29 January 2015 at 22:32, Bruno Loff <bruno.loff@gmail.com> wrote:
> The issue was first reported by Joachim Wieland to the list
> gcc@gcc.gnu.org, on Wed,
> Jan 19, 2011 (Subject: PLUGIN_FINISH_TYPE not executed for enums).
>
>
> A description of the problem/bug and how my patch addresses it.
> -------------------------------------------------------------------------------------------
> The problem was that when gcc plugins registered callbacks on the
> PLUGIN_FINISH_TYPE event, this event would not be triggered after an
> enum had finished processing.
>
> The function call that does this was not there; it seems to me that it
> has simply been forgotten.
>
> Bootstrapping and testing
> ------------------------------------
>
> make bootstrap
> make -k check
>
>  === gcc Summary ===
>
> # of expected passes            106729
> # of expected failures          256
> # of unsupported tests          1409
>
> on x86_64 ubuntu linux 14.04
>
> Furthermore, I tested the plugin functionality (with a gcc-with-python
> script), and it now works properly. (However, changes to
> gcc-with-python also had to be made so that enum type info is properly
> converted to python types; see my github fork for these changes
> https://github.com/bloff/gcc-python-plugin)
>
> The Patch
> ---------------
>
> From: bloff <bloff.sites@gmail.com>
> Date: Sun, 19 Oct 2014 14:54:01 +0100
> Subject: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
>
> First reported by Joachim Wieland to the list gcc@gcc.gnu.org, on Wed,
> Jan 19, 2011 (Subject: PLUGIN_FINISH_TYPE not executed for enums).
> ---
>  gcc/c/c-parser.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
> index 264c170..cb515aa 100644
> --- a/gcc/c/c-parser.c
> +++ b/gcc/c/c-parser.c
> @@ -2324,6 +2324,7 @@ c_parser_declspecs (c_parser *parser, struct
> c_declspecs *specs,
>           attrs_ok = true;
>           seen_type = true;
>           t = c_parser_enum_specifier (parser);
> +          invoke_plugin_callbacks (PLUGIN_FINISH_TYPE, t.spec);
>           declspecs_add_type (loc, specs, t);
>           break;
>         case RID_STRUCT:
> --
> 1.9.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]