From 448545cb51bdf3d74c3d75f3b88dbf8c7a8de984 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 17 Mar 2009 19:31:18 -0400 Subject: decl.c (grokfndecl): Set DECL_CONTEXT on parms. cp/: * decl.c (grokfndecl): Set DECL_CONTEXT on parms. (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms. * pt.c (check_explicit_specialization): Likewise. (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a local specialization. * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name. * decl2.c (parm_index): New fn. * semantics.c (finish_decltype_type): Don't use describable_type. * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR. Give a sorry for unsupported codes rather than crash. Mangle conversions with other than 1 operand. New mangling for PARM_DECL. * operators.def (ALIGNOF_EXPR): Mangle as az. * include/demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_FUNCTION_PARAM. * libiberty/cp-demangle.c (d_make_function_param): new fn. (cplus_demangle_mangled_name): Work around abi v2 bug. (d_expr_primary): Likewise. (cplus_demangle_operators): Add alignof ops. (d_expression): Handle function parameters and conversions with other than 1 operand. (d_print_comp): Handle function parameters. Fix bug with function used in type of function. From-SVN: r144924 --- include/ChangeLog | 5 +++++ include/demangle.h | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index a07e075f713..64dd0d962af 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2009-03-17 Jason Merrill + + * demangle.h (enum demangle_component_type): Add + DEMANGLE_COMPONENT_FUNCTION_PARAM. + 2008-12-10 Jason Merrill * demangle.h (enum demangle_component_type): Add diff --git a/include/demangle.h b/include/demangle.h index 28c69f5e78c..eb39c7c13c4 100644 --- a/include/demangle.h +++ b/include/demangle.h @@ -221,6 +221,8 @@ enum demangle_component_type /* A template parameter. This holds a number, which is the template parameter index. */ DEMANGLE_COMPONENT_TEMPLATE_PARAM, + /* A function parameter. This holds a number, which is the index. */ + DEMANGLE_COMPONENT_FUNCTION_PARAM, /* A constructor. This holds a name and the kind of constructor. */ DEMANGLE_COMPONENT_CTOR, @@ -466,10 +468,10 @@ struct demangle_component int len; } s_string; - /* For DEMANGLE_COMPONENT_TEMPLATE_PARAM. */ + /* For DEMANGLE_COMPONENT_*_PARAM. */ struct { - /* Template parameter index. */ + /* Parameter index. */ long number; } s_number; -- cgit v1.2.1