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: [C++ Patch] for c++/51214


2012/2/28 Jason Merrill <jason@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 sort the vector again for each enumerator; we should
> wait and sort after we've seen all of them.

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 ?

> Will unqualified lookup work
> because we're in the enumeration scope, or do we need to make lookup in the
> class work?

Sorry, could you specify what you mean ?


-- 
Fabien


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