This is the mail archive of the gcc@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++'ization of cp/parser.c/h, limited C++ parsing support for gengtype, Remove dependency of cp/cp-lang.c on cp/parser.h


On 09/10/2012 04:53 PM, Gabriel Dos Reis wrote:

It is not clear what the benefit is to move existing perfectly working
internal non-member functions to being member functions a huge struct.

I did this with cxx_eval_constant_expression and the functions it uses internally. The advantage is that you do not have to thread manually all the state arguments, and it is trivial to add additional state to pass around.


You could also do this with an explicit pointer-to-context-struct parameter that's passed around (and that version of the patch I posted), but the class-based approached seems nicer to me.

--
Florian Weimer / Red Hat Product Security Team


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