summaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
Commit message (Collapse)AuthorAgeFilesLines
* gcc/cp/jason2014-09-261-1/+10
| | | | | | | | * mangle.c (is_std_substitution): Check for abi_tag. libiberty/ * cp-demangle.c (d_substitution): Handle abi tags on abbreviation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215647 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (d_dump): Only access field from s_fixed part ofjason2014-08-291-2/+8
| | | | | | | the union for DEMANGLE_COMPONENT_FIXED_TYPE. (d_count_templates_scopes): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214740 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix demangler testsuite crashes with CP_DEMANGLE_DEBUG definedpalves2014-05-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running the demangler's testsuite with CP_DEMANGLE_DEBUG defined crashes, with: Program received signal SIGSEGV, Segmentation fault. 0x000000000040a8c3 in d_dump (dc=0x1, indent=12) at ../../src/libiberty/cp-demangle.c:567 567 switch (dc->type) (gdb) bt 3 #0 0x000000000040a8c3 in d_dump (dc=0x1, indent=12) at ../../src/libiberty/cp-demangle.c:567 #1 0x000000000040ae47 in d_dump (dc=0x7fffffffd098, indent=10) at ../../src/libiberty/cp-demangle.c:787 #2 0x000000000040ae47 in d_dump (dc=0x7fffffffd0c8, indent=8) at ../../src/libiberty/cp-demangle.c:787 Note dc=0x1, which is obviously a bogus pointer. This is the end of d_dump recursing for a component type that that doesn't actually have subtrees: 787 d_dump (d_left (dc), indent + 2); 788 d_dump (d_right (dc), indent + 2); This fixes the two cases the testsuite currently trips on. libiberty/ 2014-05-28 Pedro Alves <palves@redhat.com> * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_FUNCTION_PARAM and DEMANGLE_COMPONENT_NUMBER. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211035 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty/gary2014-05-081-6/+54
| | | | | | | | | | | | | | | | 2014-05-08 Gary Benson <gbenson@redhat.com> * cp-demangle.c (struct d_component_stack): New structure. (struct d_print_info): New field component_stack. (d_print_init): Initialize the above. (d_print_comp_inner): Renamed from d_print_comp. Do not restore template stack if it would cause a loop. (d_print_comp): New function. * testsuite/demangle-expected: New test cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210205 138bc75d-0d04-0410-961f-82ee72b054a4
* Avoid "'dc' may be uninitialized" warning.tschwinge2014-01-281-1/+3
| | | | | | | | libiberty/ * cp-demangle.c (d_demangle_callback): Put an abort call in place, to help the compiler. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207200 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty/gary2014-01-061-61/+206
| | | | | | | | | | | | | | | | | | | | | | | 2014-01-06 Gary Benson <gbenson@redhat.com> * cp-demangle.c (struct d_print_info): New fields next_saved_scope, copy_templates, next_copy_template and num_copy_templates. (d_count_templates): New function. (d_print_init): New parameter "dc". Estimate numbers of templates and scopes required. (d_print_free): Removed function. (cplus_demangle_print_callback): Allocate stack for templates and scopes. Removed call to d_print_free. (d_copy_templates): Removed function. (d_save_scope): New function. (d_get_saved_scope): Likewise. (d_print_comp): Replace state saving/restoring code with calls to d_save_scope and d_get_saved_scope. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206362 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/41090jason2013-12-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add -fdeclone-ctor-dtor. gcc/cp/ * optimize.c (can_alias_cdtor, populate_clone_array): Split out from maybe_clone_body. (maybe_thunk_body): New function. (maybe_clone_body): Call it. * mangle.c (write_mangled_name): Remove code to suppress writing of mangled name for cloned constructor or destructor. (write_special_name_constructor): Handle decloned constructor. (write_special_name_destructor): Handle decloned destructor. * method.c (trivial_fn_p): Handle decloning. * semantics.c (expand_or_defer_fn_1): Clone after setting linkage. gcc/c-family/ * c.opt: Add -fdeclone-ctor-dtor. * c-opts.c (c_common_post_options): Default to on iff -Os. gcc/ * cgraph.h (struct cgraph_node): Add calls_comdat_local. (symtab_comdat_local_p, symtab_in_same_comdat_p): New. * cif-code.def: Add USES_COMDAT_LOCAL. * symtab.c (verify_symtab_base): Make sure we don't refer to a comdat-local symbol from outside its comdat. * cgraph.c (verify_cgraph_node): Likewise. * cgraphunit.c (mark_functions_to_output): Don't mark comdat-locals. * ipa.c (symtab_remove_unreachable_nodes): Likewise. (function_and_variable_visibility): Handle comdat-local fns. * ipa-cp.c (determine_versionability): Don't clone comdat-locals. * ipa-inline-analysis.c (compute_inline_parameters): Update calls_comdat_local. * ipa-inline-transform.c (inline_call): Likewise. (save_inline_function_body): Don't clear DECL_COMDAT_GROUP. * ipa-inline.c (can_inline_edge_p): Check calls_comdat_local. * lto-cgraph.c (input_overwrite_node): Read calls_comdat_local. (lto_output_node): Write it. * symtab.c (symtab_dissolve_same_comdat_group_list): Clear DECL_COMDAT_GROUP for comdat-locals. include/ * demangle.h (enum gnu_v3_ctor_kinds): Added literal gnu_v3_unified_ctor. (enum gnu_v3_ctor_kinds): Added literal gnu_v3_unified_dtor. libiberty/ * cp-demangle.c (cplus_demangle_fill_ctor,cplus_demangle_fill_dtor): Handle unified ctor/dtor. (d_ctor_dtor_name): Handle unified ctor/dtor. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206182 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix demangler to handle conversion operators correctly.ccoutant2013-11-221-36/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | libiberty/ PR other/59195 * cp-demangle.c (struct d_info_checkpoint): New struct. (struct d_print_info): Add current_template field. (d_operator_name): Set flag when processing a conversion operator. (cplus_demangle_type): When processing <template-args> for a conversion operator, backtrack if necessary. (d_expression_1): Renamed from d_expression. (d_expression): New wrapper around d_expression_1. (d_checkpoint): New function. (d_backtrack): New function. (d_print_init): Initialize current_template. (d_print_comp): Set current_template. (d_print_cast): Put current_template in scope for printing conversion operator name. (cplus_demangle_init_info): Initialize is_expression and is_conversion. * cp-demangle.h (struct d_info): Add is_expression and is_conversion fields. * testsuite/demangle-expected: New test cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205292 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (d_copy_templates): Cast result of mallocuros2013-11-121-4/+6
| | | | | | | | | to (struct d_print_template *). (d_print_comp): Cast result of realloc to (struct d_saved scope *). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204713 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty/gary2013-10-251-2/+129
| | | | | | | | | | | | | | | | | | | | | | | 2013-10-25 Gary Benson <gbenson@redhat.com> * cp-demangle.c (struct d_saved_scope): New structure. (struct d_print_info): New fields saved_scopes and num_saved_scopes. (d_print_init): Initialize the above. (d_print_free): New function. (cplus_demangle_print_callback): Call the above. (d_copy_templates): New function. (d_print_comp): New variables saved_templates and need_template_restore. [DEMANGLE_COMPONENT_REFERENCE, DEMANGLE_COMPONENT_RVALUE_REFERENCE]: Capture scope the first time the component is traversed, and use the captured scope for subsequent traversals. * testsuite/demangle-expected: Add regression test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204068 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-11 Paul Pluzhnikov <ppluzhnikov@google.com>ppluzhnikov2013-10-121-1/+1
| | | | | | | | * cp-demangle.c (d_name): Demangle local-source-names. * testsuite/demangle-expected: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203476 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Paolo Carlini <paolo.carlini@oracle.com>paolo2013-09-101-167/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR bootstrap/58386 Revert: 2013-09-10 Gary Benson <gbenson@redhat.com> * cp-demangle.c: Include hashtab.h. (struct d_print_info): New field saved_scopes. (d_print_init): Initialize the above. (d_print_free): New function. (cplus_demangle_print_callback): Call the above. (struct d_saved_scope): New structure. (d_store_scope): New function. (d_free_scope) Likewise. (d_restore_scope) Likewise. (d_hash_saved_scope) Likewise. (d_equal_saved_scope) Likewise. (d_print_comp): New variable saved_scope. [DEMANGLE_COMPONENT_REFERENCE, DEMANGLE_COMPONENT_RVALUE_REFERENCE]: Capture scope the first time the component is traversed, and use the captured scope for subsequent traversals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202480 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Gary Benson <gbenson@redhat.com>gary2013-09-101-2/+167
| | | | | | | | | | | | | | | | | | | | | | | * cp-demangle.c: Include hashtab.h. (struct d_print_info): New field saved_scopes. (d_print_init): Initialize the above. (d_print_free): New function. (cplus_demangle_print_callback): Call the above. (struct d_saved_scope): New structure. (d_store_scope): New function. (d_free_scope) Likewise. (d_restore_scope) Likewise. (d_hash_saved_scope) Likewise. (d_equal_saved_scope) Likewise. (d_print_comp): New variable saved_scope. [DEMANGLE_COMPONENT_REFERENCE, DEMANGLE_COMPONENT_RVALUE_REFERENCE]: Capture scope the first time the component is traversed, and use the captured scope for subsequent traversals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202442 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty/jason2013-04-041-42/+29
| | | | | | | | | | | * cp-demangle.c (cplus_demangle_type): Fix function quals. (d_pointer_to_member_type): Simplify. gcc/cp/ * mangle.c (write_type): When writing a function type with function-cv-quals, don't add the unqualified type as a substitution candidate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197460 138bc75d-0d04-0410-961f-82ee72b054a4
* Demangle C++11 ref-qualifier.jason2013-04-031-13/+124
| | | | | | | | | | | | | | | | | | | | include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_REFERENCE_THIS, DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS. libiberty/ * cp-demangle.c (d_ref_qualifier): New. (d_nested_name, d_function_type): Use it. (d_parmlist): Don't get confused by a ref-qualifier. (cplus_demangle_type): Reorder ref-qualifier. (d_pointer_to_member_type): Likewise. (d_dump): Handle DEMANGLE_COMPONENT_REFERENCE_THIS and DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS. (d_make_comp, has_return_type, d_encoding): Likewise. (d_print_comp, d_print_mod_list, d_print_mod): Likewise. (d_print_function_type, is_ctor_or_dtor): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197436 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/55223jason2013-02-151-1/+20
| | | | | | | | | | | | gcc/cp/ * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of default argument scope. * mangle.c (write_name): Likewise. libiberty/ * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_DEFAULT_ARG. (d_print_comp): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196065 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (d_unqualified_name): Handle abi tags here.jason2012-11-111-22/+16
| | | | | | (d_name): Not here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193401 138bc75d-0d04-0410-961f-82ee72b054a4
* Add C++ attribute abi_tag and -Wabi-tag option.jason2012-11-091-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ * attribs.c (lookup_attribute_spec): Handle getting a TREE_LIST. gcc/c-family/ * c.opt (Wabi-tag): New. gcc/cp/ * tree.c (cxx_attribute_table): Add abi_tag attribute. (check_abi_tag_redeclaration, handle_abi_tag_attribute): New. * class.c (find_abi_tags_r, check_abi_tags): New. (check_bases, check_field_decl): Call check_abi_tags. * decl.c (redeclaration_error_message): Call check_abi_tag_redeclaration. * mangle.c (tree_string_cmp, write_abi_tags): New. (write_unqualified_name): Call write_abi_tags. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_TAGGED_NAME. libiberty/ * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_TAGGED_NAME. (d_make_comp, d_find_pack, d_print_comp): Likewise. (d_abi_tags): New. (d_name): Call it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193367 138bc75d-0d04-0410-961f-82ee72b054a4
* Allow dynamic initialization of thread_locals.jason2012-10-081-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/cp/ * decl.c: Define tls_aggregates. (expand_static_init): Remove sorry. Add to tls_aggregates. * cp-tree.h: Declare tls_aggregates. * call.c (set_up_extended_ref_temp): Add to tls_aggregates. * decl2.c (var_needs_tls_wrapper): New. (var_defined_without_dynamic_init): New. (get_tls_init_fn, get_tls_wrapper_fn): New. (generate_tls_wrapper, handle_tls_init): New. (cp_write_global_declarations): Call handle_tls_init and enerate_tls_wrapper. * mangle.c (write_guarded_var_name): Split out from.. (mangle_guard_variable): ...here. (mangle_tls_init_fn, mangle_tls_wrapper_fn): Use it. (decl_tls_wrapper_p): New. * semantics.c (finish_id_expression): Replace use of thread_local variable with a call to its wrapper. libiberty/ * cp-demangle.c (d_special_name, d_dump): Handle TH and TW. (d_make_comp, d_print_comp): Likewise. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_TLS_INIT and DEMANGLE_COMPONENT_TLS_WRAPPER. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192211 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (cplus_demangle_operators): Add *_cast.jason2012-07-181-1/+31
| | | | | | | (op_is_new_cast): New. (d_expression, d_print_comp): Check it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189630 138bc75d-0d04-0410-961f-82ee72b054a4
* http://sourceware.org/bugzilla/show_bug.cgi?id=14065tromey2012-05-221-0/+1
| | | | | | | | * testsuite/demangle-expected: Add regression test. * cp-demangle.c (d_find_pack): Return NULL for DEMANGLE_COMPONENT_UNNAMED_TYPE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187773 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/cp/jason2012-03-211-0/+5
| | | | | | | | | | * mangle.c (write_type): Handle 'auto'. * init.c (build_new): Don't do auto deduction where it might affect template mangling. libiberty/ * cp-demangle.c (cplus_demangle_type): Handle 'auto'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185595 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (cplus_demangle_operators): Add li.jason2012-03-071-1/+7
| | | | | | (d_unqualified_name): Handle it specially. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185082 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (d_print_comp) [DEMANGLE_COMPONENT_OPERATOR]:jason2012-01-101-5/+8
| | | | | | Omit a trailing space in the operator name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183072 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/6057jason2012-01-061-76/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/48051 PR c++/50855 PR c++/51322 gcc/cp/ * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR, THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and PREDECREMENT_EXPR. (write_template_arg): Fix mangling of class-scope functions and argument packs. (mangle_decl): Update suggested -fabi-version argument. * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR, DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR. * tree.c (dependent_name): No longer static. * cp-tree.h: Declare it. * pt.c (unify): Defer handling of unconverted functions. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY. libiberty/ * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_NULLARY and DEMANGLE_COMPONENT_INITIALIZER_LIST. (d_make_comp): Likewise. Allow null right arg for DEMANGLE_COMPONENT_TRINARY_ARG2. (cplus_demangle_operators): Adjust new/delete; add .*, :: and throw. (d_template_args, d_template_arg): Handle 'J' for argument packs. (d_exprlist): Add terminator parm. (d_expression, d_print_comp): Handle initializer lists, nullary expressions, prefix/suffix operators, and new. (d_print_subexpr): Avoid parens around DEMANGLE_COMPONENT_QUAL_NAME and DEMANGLE_COMPONENT_INITIALIZER_LIST. * testsuite/demangle-expected: Add tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182970 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (cplus_demangle_type): decltype, pack expansionjason2012-01-061-3/+7
| | | | | | | and vector are substitutable. (cplus_demangle_operators): Sort. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182969 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from transactional-memory branch.aldyh2011-11-081-2/+45
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181154 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/48370jason2011-11-041-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | * call.c (extend_ref_init_temps, extend_ref_init_temps_1): New. (set_up_extended_ref_temp): Use it. Change cleanup parm to VEC. (initialize_reference): Just call convert_like. * decl.c (grok_reference_init): Just call initialize_reference. (build_init_list_var_init): Remove. (check_initializer): Change cleanup parm to VEC. Handle references like other types. Call perform_implicit_conversion instead of build_init_list_var_init. Don't use build_aggr_init for aggregate initialization of arrays. (cp_finish_decl): Change cleanup to VEC. * typeck2.c (store_init_value): Call extend_ref_init_temps. Use build_vec_init for non-constant arrays. * init.c (expand_aggr_init_1): Adjust. (build_vec_init): Avoid re-converting an initializer that's already digested. * mangle.c (mangle_ref_init_variable): Add a discriminator. * cp-tree.h: Adjust. * typeck.c (convert_for_initialization): Adjust. * decl2.c (maybe_emit_vtables): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180944 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/48665ian2011-10-101-0/+24
| | | | | | | | | * cp-demangle.c (d_cv_qualifiers): If qualifiers are applied to a function type, change them to apply to the "this" parameter. * testsuite/demangle-expected: Add test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179772 138bc75d-0d04-0410-961f-82ee72b054a4
* include/ChangeLog:ccoutant2011-09-231-3/+54
| | | | | | | | | | | | | | | | | | PR 40831 * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_CLONE. libiberty/ChangeLog: PR 40831 * cp-demangle.c (d_make_comp): Add new component type. (cplus_demangle_mangled_name): Check for clone suffixes. (d_parmlist): Don't error out if we see '.'. (d_clone_suffix): New function. (d_print_comp): Print info for clone suffixes. * testsuite/demangle-expected: Add new testcases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179132 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/49932jason2011-08-011-2/+12
| | | | | | | | | gcc/cp/ * mangle.c (write_prefix): Handle decltype. libiberty/ * cp-demangle.c (d_prefix): Handle decltype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177074 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (d_print_init): Initialize pack_index field.ian2011-07-261-1/+9
| | | | | | | | (d_print_comp): Check for NULL template argument. * testsuite/demangle-expected: Add test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176791 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (d_expression): Handle 'this'.jason2011-07-041-7/+23
| | | | | | (d_print_comp) [DEMANGLE_COMPONENT_FUNCTION_PARAM]: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175836 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty/jkratoch2011-07-011-2/+55
| | | | | | | | | | | | | | | PR debug/49408 * cp-demangle.c (d_print_comp): Suppress argument list for function references by the '&' unary operator. Keep also already processed variant without the argument list. Suppress argument list types for function call used in an expression. * testsuite/demangle-expected: Fix excessive argument list types in `test for typed function in decltype'. New testcase for no argument list types printed. 3 new testcases for function references by the '&' unary operator.. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175761 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/37089jason2011-06-201-3/+31
| | | | | | * cp-demangle.c (d_print_comp): Handle reference smashing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175213 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty/jkratoch2011-06-131-1/+4
| | | | | | | | | * cp-demangle.c (d_print_comp) <DEMANGLE_COMPONENT_FUNCTION_TYPE>: Suppress d_print_mod for DMGL_RET_POSTFIX. * testsuite/demangle-expected: New testcases for --ret-postfix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175001 138bc75d-0d04-0410-961f-82ee72b054a4
* include/jkratoch2011-06-131-4/+9
| | | | | | | | | | | | | | | * demangle.h (DMGL_RET_POSTFIX): Extend the comment. (DMGL_RET_DROP): New. libiberty/ * cp-demangle.c (d_print_comp) <DEMANGLE_COMPONENT_FUNCTION_TYPE>: Do not pass DMGL_RET_POSTFIX or DMGL_RET_DROP. Support DMGL_RET_DROP. * testsuite/demangle-expected: New testcases for --ret-drop. * testsuite/test-demangle.c: Document --ret-drop in a comment. (main): New variable ret_drop, fill it, call cplus_demangle with it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175000 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty/jkratoch2011-06-131-118/+115
| | | | | | | | | | | | * cp-demangle.c (struct d_print_info): Remove field options. (d_print_init): Remove parameter options. (cplus_demangle_print_callback): Update all the callers. (d_print_comp, d_print_mod_list, d_print_mod, d_print_function_type) (d_print_array_type, d_print_expr_op, d_print_cast, d_print_subexpr): Add parameter options, update all the callers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174999 138bc75d-0d04-0410-961f-82ee72b054a4
* Properly demangle a global constructor symbol.hjl2010-11-161-1/+15
| | | | | | | | | | | | | | 2010-11-16 H.J. Lu <hongjiu.lu@intel.com> PR other/42670 PR binutils/11137 * cp-demangle.c (d_make_demangle_mangled_name): New. (d_demangle_callback): Use it on DCT_GLOBAL_XTORS. * testsuite/demangle-expected: Updated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166810 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty/:ian2010-11-131-6/+0
| | | | | | | | | | | | | PR other/46332 * cp-demangle.c (d_print_function_type): Don't print parentheses if there are no modifiers to print. * testsuite/demangle-expected: Tweak one test case, add another. libstdc++/: * testsuite/abi/demangle/abi_examples/14.cc (main): Change expected demangling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166695 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-09-10 James Lyon <jameslyon0@googlemail.com>tromey2010-09-101-0/+1
| | | | | | | | | http://sourceware.org/bugzilla/show_bug.cgi?id=11572 * cp-demangle.c (d_find_pack): Add case for DEMANGLE_COMPONENT_LAMBDA. * testsuite/demangle-expected: Add regression test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164203 138bc75d-0d04-0410-961f-82ee72b054a4
* PR other/43838jakub2010-06-101-1/+11
| | | | | | | | | | | | | * cp-demangle.c (struct d_print_info): Add flush_count field. (d_print_init): Initialize it to 0. (d_print_flush): Increment it. (d_print_comp): If needed flush before appending ", ". Only decrement dpi->len if no flushes happened during the recursive call. * testsuite/demangle-expected: Add a test for this. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160554 138bc75d-0d04-0410-961f-82ee72b054a4
* Add support for C++0x nullptr.jason2010-05-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc: * c-common.c (c_common_reswords): Add nullptr. * c-common.h: Add RID_NULLPTR. Reorganize C++0x rids. * dwarf2out.c (is_base_type): Handle NULLPTR_TYPE. (gen_type_die_with_usage): Likewise. * dbxout.c (dbxout_type): Likewise. * sdbout.c (plain_type_1): Likewise. gcc/cp: * cp-tree.def: Add NULLPTR_TYPE. * cp-tree.h: Add nullptr_node. (cp_tree_index): Add CPTI_NULLPTR. (SCALAR_TYPE_P): Add NULLPTR_TYPE. * call.c (null_ptr_cst_p): Handle nullptr. (standard_conversion): Likewise. (convert_arg_to_ellipsis): Likewise. * mangle.c (write_type): Likewise. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_parser_primary_expression): Likewise. * typeck.c (cp_build_binary_op): Likewise. (build_reinterpret_cast_1): Likewise. * error.c (dump_type): Likewise. (dump_type_prefix, dump_type_suffix): Likewise. * decl.c (cxx_init_decl_processing): Likewise. * cxx-pretty-print.c (pp_cxx_constant): Likewise. * cvt.c (ocp_convert): Likewise. * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put nullptr_t tinfo in libsupc++. libstdc++-v3: * config/abi/pre/gnu.ver: Add typeinfo for decltype(nullptr). libiberty: * cp-demangle.c (cplus_demangle_builtin_types): Add nullptr. (cplus_demangle_type): Handle nullptr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159131 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-pretty-print.c (pp_c_specifier_qualifier_list) [VECTOR_TYPE]:jason2010-03-221-2/+2
| | | | | | | Use () rather than [], and move before the element type. * cp-demangle.c (d_print_mod): Use () rather than [] for vectors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157650 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/4926jason2010-02-031-4/+19
| | | | | | | | | | | PR c++/38600 * mangle.c (write_unqualified_id): Split out from write_expression. (write_unqualified_name): Call it. (write_member_name): Likewise. (write_expression): Support TEMPLATE_ID_EXPR. Disambiguate operator names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156482 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/12909jason2010-02-031-5/+61
| | | | | | * mangle.c (write_type) [VECTOR_TYPE]: Change mangling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156481 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (cplus_demangle_type): Check for invalid typeian2010-01-261-1/+3
| | | | | | | | after "DF". * testsuite/demangle-expected: Add test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156226 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/42338jason2010-01-211-3/+12
| | | | | | | | * mangle.c (write_expression): Handle tree codes that have extra arguments in the middle-end. * cp-demangle.c (d_print_comp): Fix array index printing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156103 138bc75d-0d04-0410-961f-82ee72b054a4
* Return dgs.alc on successhjl2010-01-101-1/+1
| | | | | | | | | | | | | | | | | | | libiberty/ 2010-01-09 Ian Lance Taylor <iant@google.com> PR other/42230 * cp-demangle.c (d_demangle): Return dgs.alc on success. libstdc++-v3/ 2010-01-09 H.J. Lu <hongjiu.lu@intel.com> PR other/42230 * testsuite/abi/pr42230.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155785 138bc75d-0d04-0410-961f-82ee72b054a4
* merge in cxx0x-lambdas-branch@152308jason2009-09-301-61/+238
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152318 138bc75d-0d04-0410-961f-82ee72b054a4