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

2012-07-17 Thread Richard Guenther
On Wed, Jun 27, 2012 at 7:38 PM, Fabien Chêne wrote: > 2012/6/7 Fabien Chêne : > [...] >> ... committed as rev 188294. >> I will backport it to 4.7 when it unfreezes. > > ... Eventually backported as rev 189021. This causes PR53995. Richard. > -- > Fabien

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

2012-06-27 Thread Fabien Chêne
2012/6/7 Fabien Chêne : [...] > ... 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 : > 2012/6/3 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? > > Not at all, just lack of time, so many problems/holidays to tackle at > the moment... That is May mo

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

2012-06-04 Thread Fabien Chêne
2012/6/3 Gabriel Dos Reis : > On Sun, Jun 3, 2012 at 10:56 AM, Fabien Chêne wrote: >> 2012/6/3 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? >> >> Not at all, just lack of time,

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 wrote: > 2012/6/3 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? > > Not at all, just lack of time, so many problems/holidays to tackle at

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

2012-06-03 Thread Fabien Chêne
2012/6/3 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? 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 checking in

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 : > 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 use go

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 : > 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 i

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 finish_enum_

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

2012-02-28 Thread Fabien Chêne
2012/2/28 Fabien Chêne : > 2012/2/28 Jason Merrill : >> 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 when the type is not complete, th

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

2012-02-28 Thread Fabien Chêne
2012/2/28 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

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 Paolo Carlini
Minor nit: the correct spelling is threshold, not threashold. Thanks, Paolo.

[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 x86_64-unk