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++-11] User defined literals


On 10/08/2011 07:25 PM, Ed Smith-Rowland wrote:
Also, In spite of the documentation cp_parser_template_parameter_list
returns a TREE_VEC not a TREE_LIST. This happens inside
end_template_parm_list called inside the former. So parameter_list is a
TREE_VEC, parm_list is a TREE_LIST, parm is a PARM_DECL, etc.

Ah, I was thinking of template arguments rather than parameters. You're right, except that INNERMOST_TEMPLATE_PARMS should be just TREE_VALUE; you are already starting from the innermost parm list if you use what end_template_parm_list returns.


Though it occurs to me that push_template_decl_real might be a better place for this check.

I'm still looking for a fix for duplicate errors/warnings coming from
cp_parser_operator. I tried cp_parser_error and lost the errors. I'll
look for different code paths for the two invocations and see if I can
either move something up or see if something is set differently between
the two that would be useful for a flag.

One approach would be changing the token stream after the first error to something that won't produce another error, e.g. changing token->u.value to be an empty string after you complain about it being non-empty.


Jason


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