[PATCH] add -Wmismatched-tags (PR 61339)

2019-12-03 Thread Martin Sebor
On 8/5/19 4:30 PM, Jason Merrill wrote: On Mon, Aug 5, 2019 at 5:50 PM Martin Sebor wrote: On 8/5/19 1:25 PM, Jason Merrill wrote: On 8/1/19 7:35 PM, Martin Sebor wrote: On 8/1/19 12:09 PM, Jason Merrill wrote: On 7/22/19 12:34 PM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patch

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2020-02-18 Thread Stephan Bergmann
On 03/12/2019 22:49, Martin Sebor wrote: I added another warning: -Wredundant-tags to point out instances where the class-key or enum-key can safely be dropped. Both warnings are off by default. I think -Wredundant-tags would be more useful if it did not warn about occurrences within extern "C

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2020-02-18 Thread Martin Sebor
On 2/18/20 1:41 AM, Stephan Bergmann wrote: On 03/12/2019 22:49, Martin Sebor wrote: I added another warning: -Wredundant-tags to point out instances where the class-key or enum-key can safely be dropped. Both warnings are off by default. I think -Wredundant-tags would be more useful if it did

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-04 Thread Jason Merrill
On 12/3/19 4:49 PM, Martin Sebor wrote: On 8/5/19 4:30 PM, Jason Merrill wrote: On Mon, Aug 5, 2019 at 5:50 PM Martin Sebor wrote: On 8/5/19 1:25 PM, Jason Merrill wrote: On 8/1/19 7:35 PM, Martin Sebor wrote: On 8/1/19 12:09 PM, Jason Merrill wrote: On 7/22/19 12:34 PM, Martin Sebor wrote

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-05 Thread Martin Sebor
On 12/4/19 4:37 PM, Jason Merrill wrote: On 12/3/19 4:49 PM, Martin Sebor wrote: On 8/5/19 4:30 PM, Jason Merrill wrote: On Mon, Aug 5, 2019 at 5:50 PM Martin Sebor wrote: On 8/5/19 1:25 PM, Jason Merrill wrote: On 8/1/19 7:35 PM, Martin Sebor wrote: On 8/1/19 12:09 PM, Jason Merrill wrote

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-05 Thread Jakub Jelinek
On Thu, Dec 05, 2019 at 04:33:10PM -0700, Martin Sebor wrote: > > It's hard to distinguish between this type and the previous one by name; > > this one should probably have "map" in its name. > > > > > +static GTY (()) record_to_locs_t *rec2loc; > > ... > > > +    rec2loc = new record_to_locs_t ()

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-06 Thread Jason Merrill
On 12/5/19 6:47 PM, Jakub Jelinek wrote: On Thu, Dec 05, 2019 at 04:33:10PM -0700, Martin Sebor wrote: It's hard to distinguish between this type and the previous one by name; this one should probably have "map" in its name. +static GTY (()) record_to_locs_t *rec2loc; ... +    rec2loc = new

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-09 Thread Martin Sebor
On 12/6/19 12:08 PM, Jason Merrill wrote: On 12/5/19 6:47 PM, Jakub Jelinek wrote: On Thu, Dec 05, 2019 at 04:33:10PM -0700, Martin Sebor wrote: It's hard to distinguish between this type and the previous one by name; this one should probably have "map" in its name. +static GTY (()) record_t

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-16 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00642.html Jason, I'm on PTO until 1/6 starting this Thursday, with no connectivity. If there are any further changes to make to the patch I will need to make them before then, or otherwise after I get back in January. On 12/9/19 5:29 PM, Mart

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-16 Thread Jason Merrill
On 12/9/19 7:29 PM, Martin Sebor wrote: Just a few nits: +/* A mapping between a TYPE_DECL for a class and the class_decl_loc_t + description above. */ +typedef hash_map class_to_loc_map_t; +static class_to_loc_map_t class2loc; I think we can make these members of class_decl_loc_t, now tha

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-16 Thread Martin Sebor
On 12/16/19 3:51 PM, Jason Merrill wrote: On 12/9/19 7:29 PM, Martin Sebor wrote: Just a few nits: +/* A mapping between a TYPE_DECL for a class and the class_decl_loc_t +   description above.  */ +typedef hash_map class_to_loc_map_t; +static class_to_loc_map_t class2loc; I think we can make

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-17 Thread Jason Merrill
On 12/16/19 6:31 PM, Martin Sebor wrote: + class_decl_loc_t *rdl = class2loc.get (type_decl); + if (!rdl) +{ + rdl = &class2loc.get_or_insert (type_decl); I was thinking class_decl_loc_t *rdl = &class2loc.get_or_insert (type_decl); OK with that change. Jason