* [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
@ 2015-01-29 23:06 Bruno Loff
2015-02-01 15:39 ` Bruno Loff
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Bruno Loff @ 2015-01-29 23:06 UTC (permalink / raw)
To: gcc-patches
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-01-29 23:06 [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing Bruno Loff
@ 2015-02-01 15:39 ` Bruno Loff
2015-02-02 18:00 ` Joseph Myers
2015-02-02 18:20 ` Bruno Loff
2015-02-02 19:03 ` Diego Novillo
2 siblings, 1 reply; 11+ messages in thread
From: Bruno Loff @ 2015-02-01 15:39 UTC (permalink / raw)
To: gcc-patches
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-02-01 15:39 ` Bruno Loff
@ 2015-02-02 18:00 ` Joseph Myers
0 siblings, 0 replies; 11+ messages in thread
From: Joseph Myers @ 2015-02-02 18:00 UTC (permalink / raw)
To: Bruno Loff; +Cc: gcc-patches
On Sun, 1 Feb 2015, Bruno Loff wrote:
> Do I need to do anything else to get this patch into gcc?
I suggest CC:ing the plugin maintainers (as listed in the MAINTAINERS
file), and then pinging weekly for as long as needed.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-01-29 23:06 [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing Bruno Loff
2015-02-01 15:39 ` Bruno Loff
@ 2015-02-02 18:20 ` Bruno Loff
2015-02-02 18:42 ` Cary Coutant
2015-02-02 19:03 ` Diego Novillo
2 siblings, 1 reply; 11+ messages in thread
From: Bruno Loff @ 2015-02-02 18:20 UTC (permalink / raw)
To: gcc-patches; +Cc: Cary Coutant, Diego Novillo, Le-Chun Wu
I am forwarding this reply to Cary Coutant, Diego Novillo and Le-Chun
Wu, as they were listed as the plugin maintainers.
Cary, Diego, Le-Chun, please let me know if you are on it, or if I
should send it to someone else.
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-02-02 18:20 ` Bruno Loff
@ 2015-02-02 18:42 ` Cary Coutant
0 siblings, 0 replies; 11+ messages in thread
From: Cary Coutant @ 2015-02-02 18:42 UTC (permalink / raw)
To: Bruno Loff; +Cc: gcc-patches, Diego Novillo, Le-Chun Wu
> I am forwarding this reply to Cary Coutant, Diego Novillo and Le-Chun
> Wu, as they were listed as the plugin maintainers.
>
> Cary, Diego, Le-Chun, please let me know if you are on it, or if I
> should send it to someone else.
Sorry, this isn't my kind of plugin -- I'm a maintainer for the LTO
linker plugin, but this looks like it's related to GCC plugins. Diego
or Le-Chun should be able to help, though.
-cary
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-01-29 23:06 [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing Bruno Loff
2015-02-01 15:39 ` Bruno Loff
2015-02-02 18:20 ` Bruno Loff
@ 2015-02-02 19:03 ` Diego Novillo
2015-02-02 19:07 ` Bruno Loff
2 siblings, 1 reply; 11+ messages in thread
From: Diego Novillo @ 2015-02-02 19:03 UTC (permalink / raw)
To: Bruno Loff; +Cc: gcc-patches
On Thu, Jan 29, 2015 at 4:32 PM, 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:
>
This is OK with a ChangeLog entry.
Thanks. Diego.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-02-02 19:03 ` Diego Novillo
@ 2015-02-02 19:07 ` Bruno Loff
2015-02-02 19:17 ` Diego Novillo
0 siblings, 1 reply; 11+ messages in thread
From: Bruno Loff @ 2015-02-02 19:07 UTC (permalink / raw)
To: Diego Novillo; +Cc: gcc-patches
Something like:
The PLUGIN_FINISH_TYPE callback for gcc plugins is now triggered for
enum declarations.
?
On 2 February 2015 at 20:03, Diego Novillo <dnovillo@google.com> wrote:
> On Thu, Jan 29, 2015 at 4:32 PM, 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:
>>
> This is OK with a ChangeLog entry.
>
> Thanks. Diego.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-02-02 19:07 ` Bruno Loff
@ 2015-02-02 19:17 ` Diego Novillo
2015-02-02 19:40 ` Bruno Loff
0 siblings, 1 reply; 11+ messages in thread
From: Diego Novillo @ 2015-02-02 19:17 UTC (permalink / raw)
To: Bruno Loff; +Cc: gcc-patches
On Mon, Feb 2, 2015 at 2:07 PM, Bruno Loff <bruno.loff@gmail.com> wrote:
> Something like:
>
> The PLUGIN_FINISH_TYPE callback for gcc plugins is now triggered for
> enum declarations.
>
> ?
ChangeLog entries in GCC are pretty pick as to how they want to be
formatted. See other entries for reference and
https://gcc.gnu.org/codingconventions.html#ChangeLogs for specific
documentation.
Diego.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-02-02 19:17 ` Diego Novillo
@ 2015-02-02 19:40 ` Bruno Loff
2015-02-02 19:41 ` Diego Novillo
2015-02-02 21:20 ` Diego Novillo
0 siblings, 2 replies; 11+ messages in thread
From: Bruno Loff @ 2015-02-02 19:40 UTC (permalink / raw)
To: Diego Novillo; +Cc: gcc-patches
Sorry, first contribution ever :) Here is the entry:
2014-10-19 Bruno Loff <bruno.loff@gmail.com>
* c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
processing enum declaration.
The dates are off because I actually made the change a while ago (took
me a while because I needed to test it with the plugin and make sure I
didn't mess it up).
Bruno
In case you want a diff file...
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 6cf964c..080bd61 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-19 Bruno Loff <bruno.loff@gmail.com>
+
+ * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
+ processing enum declaration.
+
2014-09-25 Thomas Schwinge <thomas@codesourcery.com>
PR c++/63249
--
1.9.1
On 2 February 2015 at 20:17, Diego Novillo <dnovillo@google.com> wrote:
> On Mon, Feb 2, 2015 at 2:07 PM, Bruno Loff <bruno.loff@gmail.com> wrote:
>> Something like:
>>
>> The PLUGIN_FINISH_TYPE callback for gcc plugins is now triggered for
>> enum declarations.
>>
>> ?
>
> ChangeLog entries in GCC are pretty pick as to how they want to be
> formatted. See other entries for reference and
> https://gcc.gnu.org/codingconventions.html#ChangeLogs for specific
> documentation.
>
>
> Diego.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-02-02 19:40 ` Bruno Loff
@ 2015-02-02 19:41 ` Diego Novillo
2015-02-02 21:20 ` Diego Novillo
1 sibling, 0 replies; 11+ messages in thread
From: Diego Novillo @ 2015-02-02 19:41 UTC (permalink / raw)
To: Bruno Loff; +Cc: gcc-patches
That's
On Mon, Feb 2, 2015 at 2:39 PM, Bruno Loff <bruno.loff@gmail.com> wrote:
> Sorry, first contribution ever :) Here is the entry:
>
> 2014-10-19 Bruno Loff <bruno.loff@gmail.com>
>
> * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
> processing enum declaration.
This is fine. Thanks.
> The dates are off because I actually made the change a while ago (took
> me a while because I needed to test it with the plugin and make sure I
> didn't mess it up).
Just change the date to the date of when you commit the patch.
Diego.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing
2015-02-02 19:40 ` Bruno Loff
2015-02-02 19:41 ` Diego Novillo
@ 2015-02-02 21:20 ` Diego Novillo
1 sibling, 0 replies; 11+ messages in thread
From: Diego Novillo @ 2015-02-02 21:20 UTC (permalink / raw)
To: Bruno Loff; +Cc: gcc-patches
On Mon, Feb 2, 2015 at 2:39 PM, Bruno Loff <bruno.loff@gmail.com> wrote:
> 2014-10-19 Bruno Loff <bruno.loff@gmail.com>
>
> * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
> processing enum declaration.
Thanks. Committed at r220358.
Diego.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-02-02 21:20 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 23:06 [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing Bruno Loff
2015-02-01 15:39 ` Bruno Loff
2015-02-02 18:00 ` Joseph Myers
2015-02-02 18:20 ` Bruno Loff
2015-02-02 18:42 ` Cary Coutant
2015-02-02 19:03 ` Diego Novillo
2015-02-02 19:07 ` Bruno Loff
2015-02-02 19:17 ` Diego Novillo
2015-02-02 19:40 ` Bruno Loff
2015-02-02 19:41 ` Diego Novillo
2015-02-02 21:20 ` Diego Novillo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).