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++: enum parsing speedups


Mark Mitchell <mark@codesourcery.com> writes:

> We don't want do add more of those calls if we can help it; those 
> functions are on the fast path, and the c_l_s_s_p function is not free.  
> Just change the error markers in the test case, assuming the messages 
> come out somewhere sensible.  We've done that plenty in the past; 
> whether or not an error message shows up on the {enum,class}-specifier, 
> or the curly brace, is not a very big deal.

I'm fine with that - in fact I personally think it makes more sense
for the message to come out on the line with the identifier on it -
but the point of g++.other/enum2.C is very specifically to enforce
that the message comes out on the line with the curly brace.  I'm
cc:ing Nathan Sidwell as he added the test.  Nathan, do you still have
an opinion here?

It occurs to me that I could call c_l_s_s_p from
cp_parse_enum_specifier if we really do want the message on the curly
brace, so I needn't put it in the token consumption calls.

I wonder how hard it would be to get rid of c_l_s_s_p altogether. >>queue...

zw


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