Re: [C++ Patch] for c++/51214

2012-06-27 Thread Fabien Chêne
2012/6/7 Fabien Chêne fabien.ch...@gmail.com: [...] ... committed as rev 188294. I will backport it to 4.7 when it unfreezes. ... Eventually backported as rev 189021. -- Fabien

Re: [C++ Patch] for c++/51214

2012-06-06 Thread Fabien Chêne
2012/6/3 Fabien Chêne fabien.ch...@gmail.com: 2012/6/3 Jason Merrill ja...@redhat.com: On 05/24/2012 09:18 AM, Jason Merrill wrote: OK, thanks. I notice you haven't checked the patch in yet, is there a problem? Not at all, just lack of time, so many problems/holidays to tackle at the

Re: [C++ Patch] for c++/51214

2012-06-04 Thread Fabien Chêne
2012/6/3 Gabriel Dos Reis g...@integrable-solutions.net: On Sun, Jun 3, 2012 at 10:56 AM, Fabien Chêne fabien.ch...@gmail.com wrote: 2012/6/3 Jason Merrill ja...@redhat.com: On 05/24/2012 09:18 AM, Jason Merrill wrote: OK, thanks. I notice you haven't checked the patch in yet, is there a

Re: [C++ Patch] for c++/51214

2012-06-03 Thread Fabien Chêne
2012/6/3 Jason Merrill ja...@redhat.com: On 05/24/2012 09:18 AM, Jason Merrill wrote: OK, thanks. I notice you haven't checked the patch in yet, is there a problem? Not at all, just lack of time, so many problems/holidays to tackle at the moment... That is May month in France ;-) I'll be

Re: [C++ Patch] for c++/51214

2012-06-03 Thread Gabriel Dos Reis
On Sun, Jun 3, 2012 at 10:56 AM, Fabien Chêne fabien.ch...@gmail.com wrote: 2012/6/3 Jason Merrill ja...@redhat.com: On 05/24/2012 09:18 AM, Jason Merrill wrote: OK, thanks. I notice you haven't checked the patch in yet, is there a problem? Not at all, just lack of time, so many

Re: [C++ Patch] for c++/51214

2012-06-02 Thread Jason Merrill
On 05/24/2012 09:18 AM, Jason Merrill wrote: OK, thanks. I notice you haven't checked the patch in yet, is there a problem? Jason

Re: [C++ Patch] for c++/51214

2012-05-24 Thread Jason Merrill
OK, thanks. Jason

Re: [C++ Patch] for c++/51214

2012-05-23 Thread Fabien Chêne
2012/5/7 Jason Merrill ja...@redhat.com: On 05/06/2012 04:06 PM, Fabien Chêne wrote: +      if (late_enum_values) +          VEC_safe_push (tree, gc, late_enum_values, decl); I would think you could walk the TYPE_VALUES list directly, rather than copy it into a temporary VEC. Indeed, let's

Re: [C++ Patch] for c++/51214

2012-05-07 Thread Jason Merrill
On 05/06/2012 04:06 PM, Fabien Chêne wrote: + if (late_enum_values) + VEC_safe_push (tree, gc, late_enum_values, decl); I would think you could walk the TYPE_VALUES list directly, rather than copy it into a temporary VEC. Jason

Re: [C++ Patch] for c++/51214

2012-05-06 Thread Fabien Chêne
2012/2/29 Jason Merrill ja...@redhat.com: On 02/28/2012 05:06 PM, Fabien Chêne wrote: I agree, this is not efficient but I didn't find a better place. perhaps in cp_parser_enumerator_list,  that would require adding an additional parameter to keep track of all the enum DECLs. Is it what you

Re: [C++ Patch] for c++/51214

2012-02-29 Thread Jason Merrill
On 02/28/2012 05:06 PM, Fabien Chêne wrote: I agree, this is not efficient but I didn't find a better place. perhaps in cp_parser_enumerator_list, that would require adding an additional parameter to keep track of all the enum DECLs. Is it what you have in mind ? I was thinking of

[C++ Patch] for c++/51214

2012-02-28 Thread Fabien Chêne
Hi, The problem in this PR is that the CLASSTYPE_SORTED_FIELDS is created too early (in finish_struct_1) to handle those late unscoped enum definitions. Consequently, I propose to lately add those names in CLASSTYPE_SORTED_FIELDS when they are encountered, in build_enumerator. Tested

Re: [C++ Patch] for c++/51214

2012-02-28 Thread Paolo Carlini
Minor nit: the correct spelling is threshold, not threashold. Thanks, Paolo.

Re: [C++ Patch] for c++/51214

2012-02-28 Thread Jason Merrill
On 02/28/2012 03:36 PM, Fabien Chêne wrote: * decl.c (build_enumerator): Call insert_into_classtype_sorted_fields if an enumerator-definition referring to a class scope opaque enum has been encountered. This will insert and sort the vector again for each enumerator; we

Re: [C++ Patch] for c++/51214

2012-02-28 Thread Fabien Chêne
2012/2/28 Jason Merrill ja...@redhat.com: On 02/28/2012 03:36 PM, Fabien Chêne wrote:        * decl.c (build_enumerator): Call        insert_into_classtype_sorted_fields if an enumerator-definition referring        to a class scope opaque enum has been encountered. This will insert and

Re: [C++ Patch] for c++/51214

2012-02-28 Thread Fabien Chêne
2012/2/28 Fabien Chêne fabien.ch...@gmail.com: 2012/2/28 Jason Merrill ja...@redhat.com: On 02/28/2012 03:36 PM, Fabien Chêne wrote: [...] Will unqualified lookup work because we're in the enumeration scope, or do we need to make lookup in the class work? Unqualified lookup works because