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++0x] Range-based for statements and ADL


On 04/11/2011 04:50 PM, Rodrigo Rivas wrote:
Because the type of the expression must have complete type *only* if
it is an array.

Actually, if it has class type, it must also have a complete type or the class member lookup is ill-formed. And you can't pass an expression of void type to a function call. So we can just unconditionally require a complete type.


Well, I just did that, but I'm not sure this is totally correct, I've
just begun to understand finish_call_expr. It works, if only because
I'm the only one using this new code path. Fell free to
revise/change/comment about it.

It looks fine.


+ ? LOOKUP_NONVIRTUAL : 0),

Except this should be ? LOOKUP_NORMAL|LOOKUP_NORVIRTUAL : LOOKUP_NORMAL. The other calls to build_new_method_call here should be fixed that way, too.


Jason


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