1. 02 Apr, 2005 1 commit
  2. 28 Mar, 2005 1 commit
    • xregex2.h (_RE_ARGS): Remove definition and uses. · 93079c81
      include/
      2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              * xregex2.h (_RE_ARGS): Remove definition and uses.
      
      libiberty/
      2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              Convert libiberty to use ISO C prototype style 7/n.
              * regex.c (PARAMS): Remove definition.
              (PREFIX): Unconditionaly define using ISO C ## operator.
              (init_syntax_once, extract_number, extract_number_and_incr,
              print_fastmap, print_partial_compiled_pattern,
              print_compiled_pattern, print_double_string, printchar,
              convert_mbs_to_wcs, re_set_syntax, regex_grow_registers,
              regex_compile, store_op1, store_op2, insert_op1, insert_op2,
              at_begline_loc_p, at_endline_p, group_in_compile_stack,
              insert_space, wcs_compile_range, byte_compile_range,
              truncate_wchar, re_compile_fastmap, re_compile_fastmap,
              re_set_registers, re_search, re_search_2, re_search_3,
              re_match,
              re_match_2, count_mbs_length, wcs_re_match_2_internal,
              byte_re_match_2_internal, group_match_null_string_p,
              alt_match_null_string_p, common_op_match_null_string_p,
              bcmp_translate, re_compile_pattern, re_comp, re_exec, regcomp,
              regexec, regerror, regfree): Use ISO C prototype style.
              * partition.c: (elem_compare): Likewise.
              * cp-demangle.c (print_usage): Likewise.
      
      From-SVN: r97129
      Gabriel Dos Reis committed
  3. 26 Mar, 2005 1 commit
    • demangle.h: Remove uses of PARAMS. · 9486db4f
      include/
      2005-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              * demangle.h: Remove uses of PARAMS.
      
              * libiberty.h (ANSI_PROTOTYPES): Remove guard since
              ANSI_PROTOTYPES is always assumed.
              Remove uses of PARAMS throughout.
      
      libiberty/
      2005-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              Convert libiberty to use ISO C prototype style 2/n.
              * cp-demangle.h: Remove uses of PARAMS.
              * cp-demangle.c: Likewise.
              (d_dump, cplus_demangle_fill_name,
              cplus_demangle_fill_extended_operator,
              cplus_demangle_fill_ctor,
              cplus_demangle_fill_dtor, d_make_empty, d_make_comp,
              d_make_name,
              d_make_builtin_type, d_make_operator,
              d_make_extended_operator,
              d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
              cplus_demangle_mangled_name, has_return_type,
              is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
              d_prefix, d_unqualified_name, d_source_name, d_number,
              d_identifier, d_operator_name, d_special_name, d_call_offset,
              d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
              d_function_type, d_bare_function_type, d_class_enum_type,
              d_array_type, d_pointer_to_member_type, d_template_param,
              d_template_args, d_template_arg, d_expression, d_expr_primary,
              d_local_name, d_discriminator, d_add_substitution,
              d_substitution, d_print_resize, d_print_append_char,
              d_print_append_buffer, d_print_error, cplus_demangle_print,
              d_print_comp, d_print_java_identifier, d_print_mod_list,
              d_print_mod, d_print_function_type, d_print_array_type,
              d_print_expr_op, d_print_cast, cplus_demangle_init_info,
              d_demangle, __cxa_demangle, cplus_demangle_v3,
              java_demangle_v3,
              is_ctor_or_dtor, is_gnu_v3_mangled_ctor,
              is_gnu_v3_mangled_dtor,
              print_usage, main):
      
      2005-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              Convert libiberty to ISO C prototype style 1/n.
              * _doprnt.c: Remove conditional #include <varargs.h> on
              ANSI_PROTOTYPES as the latter is always assumed.
              (_doprnt, checkit, main): Use ISO C prototype.
              * alloca.c (find_stack_direction, C_alloca): Use ISO C
              prototype.
              * argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
              (dupargv, freeargv, buildargv, main): Use ISO C prototype.
              * atexit.c (atexit): Likewise
              * asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
              (asprintf): Use ISO C prototype.
              * basename.c (basename): Likewise
              * bcmp.c (bcmp): Likewise.
              * bcopy.c (bcopy): Likewise.
              * bzero.c (bzero): Likewise.
              * bsearch.c (bsearch): Likewise.  Improve const-correctness.
              * choose-temp.c (choose_temp_base): Likewise.
              * calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
              (calloc): Use ISO C prototype.
              * clock.c (clock): Likewise.
              * concat.c: Remove conditional #include on ANSI_PROTOTYPES.
              (vconcat_length, vconcat_copy, concat_length, concat_copy,
              concat_copy2, concat, reconcat, main): Use ISO C prototype.
              * copysign.c (copysign): Likewise.
      
      From-SVN: r97085
      Gabriel Dos Reis committed
  4. 13 Feb, 2005 1 commit
  5. 24 Nov, 2004 1 commit
  6. 28 Jun, 2004 1 commit
  7. 25 Feb, 2004 2 commits
    • cp-demangle.h (enum d_builtin_type_print): Add D_PRINT_UNSIGNED... · 31058ee3
      	* cp-demangle.h (enum d_builtin_type_print): Add D_PRINT_UNSIGNED,
      	D_PRINT_UNSIGNED_LONG, D_PRINT_LONG_LONG,
      	D_PRINT_UNSIGNED_LONG_LONG, D_PRINT_FLOAT.
      	* cp-demangle.c (cplus_demangle_builtin_types): Change char and
      	short types to D_PRINT_DEFAULT.  Change other integer types to use
      	new D_PRINT_* values where appropriate.  Change float types to
      	D_PRINT_FLOAT.
      	(d_print_comp) [LITERAL, LITERAL_NEG]: Handle new D_PRINT_*
      	values.
      	* testsuite/demangle-expected: Adjust two test cases.
      
      	* cp-demangle.c (d_print_function_type): Print a space before the
      	parenthesis around the function type in more cases.
      	* testsuite/demangle-expected: Adjust one test case.
      
      From-SVN: r78421
      Ian Lance Taylor committed
    • cp-demangle.c (d_print_comp): Don't emit extra parentheses around a cast. · 93f20626
      	* cp-demangle.c (d_print_comp) [UNARY]: Don't emit extra
      	parentheses around a cast.
      	* testsuite/demangle-expected: Adjust two test cases to match new
      	output.
      
      From-SVN: r78416
      Ian Lance Taylor committed
  8. 24 Feb, 2004 4 commits
  9. 13 Jan, 2004 1 commit
  10. 12 Jan, 2004 1 commit
    • demangle.h (enum demangle_component_type): Define. · 5e777af5
      	* demangle.h (enum demangle_component_type): Define.
      	(struct demangle_operator_info): Declare.
      	(struct demangle_builtin_type_info): Declare.
      	(struct demangle_component): Define.
      	(cplus_demangle_fill_component): Declare.
      	(cplus_demangle_fill_name): Declare.
      	(cplus_demangle_fill_builtin_type): Declare.
      	(cplus_demangle_fill_operator): Declare.
      	(cplus_demangle_fill_extended_operator): Declare.
      	(cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
      	(cplus_demangle_v3_components): Declare.
      	(cplus_demangle_print): Declare.
      
      	* cp-demangle.c: Include "cp-demangle.h".  If IN_GLIBCPP_V3 is
      	defined, rename some functions which are to become static via
      	#define.
      	(CP_STATIC_IF_GLIBCPP_V3): Define.
      	(struct d_operator_info): Move definition to cp-demangle.h, and
      	rename to demangle_operator_info.  Change all uses.
      	(enum d_builtin_type_print): Move definition to cp-demangle.h.
      	(struct d_builtin_type_info): Move definition to cp-demangle.h,
      	and rename to demangle_builtin_type_info.  Change all uses.
      	(enum d_comp_type): Move definition to include/demangle.h, and
      	rename to demangle_component_type, and change all enums to start
      	with DEMANGLE_COMPONENT_ instead of D_.  Change all uses.
      	(struct d_comp): Move definition to include/demangle.h, and rename
      	to demangle_component.  Change all uses.
      	(struct d_info): Move definition to cp-demangle.h.
      	(cplus_demangle_fill_name): New function.
      	(cplus_demangle_fill_extended_operator): New function.
      	(cplus_demangle_fill_ctor): New function.
      	(cplus_demangle_fill_dtor): New function.
      	(d_make_empty): Remove type parameter.  Change all callers.
      	(d_make_name): Use cplus_demangle_fill_name.
      	(d_make_extended_operator): Use
      	cplus_demangle_fill_extended_operator.
      	(d_make_ctor): Use cplus_demangle_fill_ctor.
      	(d_make_dtor): Use cplus_demangle_fill_dtor.
      	(cplus_demangle_mangled_name): Rename from d_mangled_name.  Make
      	non-static by default.  Change all callers.
      	(cplus_demangle_operators): Rename from d_operators.  Change all
      	uses.  Make non-static by default.  Add sentinel at end of array.
      	(d_operator_name): Adjust initialization of high for new sentinel
      	in cplus_demangle_operators.
      	(cplus_demangle_builtin_types): Rename from d_builtin_types.
      	Change all uses.  Make non-static by default.  Change initializer
      	to use D_BUILTIN_TYPE_COUNT instead of magic number 26.
      	(cplus_demangle_type): Rename from d_type.  Make non-static by
      	default.  Change all callers.
      	(cplus_demangle_init_info): Rename from d_init_info.  Make
      	non-static by default.  Change all callers.
      	* cp-demangle.h: New file.
      	* cp-demint.c: New file.
      	* Makefile.in: Rebuild dependencies.
      	(CFILES): Add cp-demint.c.
      	(REQUIRED_OFILES): Add cp-demint.o.
      
      From-SVN: r75748
      Ian Lance Taylor committed
  11. 02 Jan, 2004 1 commit
    • cp-demangle.c (d_encoding): When DMGL_PARAMS is not set... · e4796f1c
      	* cp-demangle.c (d_encoding): When DMGL_PARAMS is not set, strip
      	CV-qualifiers from D_COMP_LOCAL_NAME right subtree.
      	* cplus-dem.c (demangle_arm_hp_template): Set DMGL_PARAMS when
      	demangling template parameters.
      	* testsuite/test-demangle.c (fail): New static function.
      	(main): Support new options in input file: --no-params,
      	--is-v3-ctor, and --is-v3-dtor.
      	* testsuite/demangle-expected: Add --no-params to most tests, and
      	add the correct result when parameters are not demangled.  Add
      	some simple tests for V3 constructor/destructor recognition.
      
      From-SVN: r75336
      Ian Lance Taylor committed
  12. 26 Dec, 2003 1 commit
  13. 22 Dec, 2003 1 commit
    • cp-demangle.c (CP_DYNAMIC_ARRAYS): Define if compiler supports dynamic arrays. · 2d6c4025
      	* cp-demangle.c (CP_DYNAMIC_ARRAYS): Define if compiler supports
      	dynamic arrays.
      	(struct d_operator_info): Add len field.
      	(struct d_builtin_type_info): Add len and java_len fields.
      	(struct d_standard_sub_info): Add simple_len, full_len, and
      	set_last_name_len fields.
      	(struct d_comp): Add len field to s_string.
      	(struct d_info): Add send, did_subs, and expansion fields.
      	(d_append_string_constant): Define.
      	(d_append_string): Remove.  Change all users to use
      	d_append_string_constant or d_append_buffer instead.
      	(d_make_sub): Add len parameter.  Change all callers.
      	(d_name): Increase expansion when substituting std::.
      	(d_unqualified_name): Increase expansion for an operator.
      	(d_number): Don't use multiplication for negative numbers.
      	(d_identifier): Make sure there are enough characters in the
      	string for the specified length.  Adjust expansion for an
      	anonymous namespace.
      	(d_operators): Initialize len field.
      	(d_special_name, d_ctor_dtor_name): Increase expansion.
      	(d_builtin_types): Initialize len and java_len fields.
      	(d_type): Increase expansion for a builtin type.
      	(d_cv_qualifiers): Increase expansion for each qualifier.
      	(d_bare_function_type): Decrease expansion when removing single
      	void parameter.
      	(d_template_param): Increment did_subs.
      	(d_expression): Increase expansion for an operator.
      	(d_expr_primary): Decrease expansion for a type we will print
      	specially.
      	(standard_subs): Initialize new fields.
      	(d_substitution): Increment did_subs when doing a normal
      	substitution.  Increase expansion for a special substitution.
      	(d_print): Add estimate parameter.  Change all callers.
      	(d_print_comp) [D_COMP_NAME]: Handle C++ case inline.
      	(d_print_comp) [D_COMP_BINARY]: Use length to avoid strcmp call.
      	(d_print_java_identifier): Rename from d_print_identifier.  Handle
      	only Java case.  Change caller.
      	(d_init_info): Change return type to void.  Change all callers.
      	Initialize send, did_subs, and expansion fields.  Do not
      	initialize comps and subs fields.
      	(d_demangle): Ifdef CP_DYNAMIC_ARRAYS, allocate comps and subs
      	arrays on stack.  Make an estimate of the length of the demangled
      	name.  Ifdef CP_DEMANGLE_DEBUG, print estimation failures.
      	(is_ctor_or_dtor): Ifdef CP_DYNAMIC_ARRAYS, allocate comps and
      	subs arrays on stack.
      
      From-SVN: r74933
      Ian Lance Taylor committed
  14. 20 Dec, 2003 1 commit
  15. 19 Dec, 2003 1 commit
    • re PR c++/13447 (Another demangler problem with method cv-qualifiers) · a91d1af0
      	Fix for PR c++/13447:
      	* cp-demangle.c (enum d_comp_type): Add D_COMP_LOCAL_NAME.
      	(d_dump, d_make_comp): Handle D_COMP_LOCAL_NAME.
      	(is_ctor_dtor_or_conversion): Handle D_COMP_LOCAL_NAME like
      	D_COMP_QUAL_NAME.
      	(is_ctor_or_dtor): Likewise.
      	(d_local_name): Use D_COMP_LOCAL_NAME rather than
      	D_COMP_QUAL_NAME.
      	(d_print_comp) [D_COMP_LOCAL_NAME]: New.
      	(d_prinT_comp) [D_COMP_TYPED_NAME]: If the left tree is
      	D_COMP_LOCAL_NAME, pull any qualifiers off its right subtree.
      	(d_print_mod_list): Handle D_COMP_LOCAL_NAME.
      	* testsuite/demangle-expected: Add two test cases.
      
      	* cp-demangle.c (d_print_function_type): Clear the global modifier
      	list when printing the modifiers, not just when printing the
      	function parameters.
      	* testsuite/demangle-expected: Add two test cases.
      
      From-SVN: r74850
      Ian Lance Taylor committed
  16. 15 Dec, 2003 3 commits
  17. 04 Dec, 2003 1 commit
    • re PR other/13304 (demangler bad output, "operator<<" insteads of "operator< <") · a51753e4
      	* cp-demangle.c (IS_UPPER, IS_LOWER): Define.
      	(d_last_char): Define new macro.
      	(d_make_name): Reject an empty name.
      	(d_prefix, d_unqualified_name, d_type): Use new IS_* macros.
      	(d_substitution, d_print_identifier): Likewise.
      	(d_print_comp) [D_COMP_OPERATOR]: Likewise.
      	(d_print_comp) [D_COMP_TEMPLATE]: Use new d_last_char macro.
      	(d_print_mod) Use new d_last_char macro.
      	(d_print_cast): Use new d_last_char macro.
      	(is_ctor_or_dtor): Don't leak memory.
      
      	Fix handling of member function modifiers:
      	* cp-demangle.c (enum d_comp_type): Add D_COMP_RESTRICT_THIS,
      	D_COMP_VOLATILE_THIS, and D_COMP_CONST_THIS.
      	(d_dump): Dump new d_comp_type values.
      	(d_make_comp): Accept new d_comp_type values.
      	(has_return_type): Only accept _THIS variants of qualifiers.
      	(d_encoding): Without DMGL_PARAMS, only remove _THIS variants of
      	qualifiers.
      	(d_cv_qualifiers): Add member_fn parameter.  Change all callers.
      	(d_print_comp) [D_COMP_TYPED_NAME]: Rather than removing
      	qualifiers and printing them at the end, add _THIS qualifiers to
      	the modifier list.
      	(d_print_comp) [D_COMP_*_THIS]: New cases.
      	(d_print_comp) [D_COMP_PTRMEM_TYPE]: Remove special handling of
      	qualifiers.
      	(d_print_mod_list): Add suffix parameter.  Change all callers.
      	Keep walking the list even if the current modifier has been
      	printed.
      	(d_print_mod): Handle new _THIS qualifiers.
      	(d_print_function_type): Handle new _THIS qualifiers when deciding
      	whether to print a parenthesis.  Put a space before the
      	parenthesis in some cases.  Call d_print_mod_list again at the
      	end, passing suffix as 1.
      	(is_ctor_or_dtor): Look for new _THIS qualifiers.
      	* testsuite/demangle-expected: Add test case.
      
      	Fix for PR gcc/13304:
      	* cp-demangle.c (d_print_comp) [D_COMP_TEMPLATE]: If the character
      	before the '<' is itself a '<', insert a space.
      	(d_print_cast): Likewise.
      	* testsuite/demangle-expected: Add test case.
      
      	Fix for PR gcc/13244:
      	* cp-demangle.c (d_print_comp) [D_COMP_BINARY]: Wrap an expression
      	which uses the '>' operator in an extra layer of parens.
      	* testsuite/demangle-expected: Add test case.
      
      From-SVN: r74290
      Ian Lance Taylor committed
  18. 01 Dec, 2003 1 commit
  19. 26 Nov, 2003 1 commit
    • cp-demangle.c (struct d_print_mod): Add templates field. · 81dc098b
      	* cp-demangle.c (struct d_print_mod): Add templates field.
      	(d_make_builtin_type): Check for NULL type.
      	(d_make_extended_operator): Check for NULL name.
      	(d_make_ctor, d_make_dtor): Likewise.
      	(d_mangled_name): Add top_level parameter.  Change all callers.
      	(d_encoding): If DMGL_PARAMS is not set, strip off initial
      	CV-qualifiers.
      	(d_type): Check some return values we rely on.
      	(d_bare_function_type, d_array_type): Likewise.
      	(d_pointer_to_member_type, d_template_args): Likewise.
      	(d_add_substitution): Fail if argument is NULL.
      	(d_print_resize): Check whether buf is NULL.
      	(d_print_comp): Save current templates list with each modifier.
      	Don't pass the modifier list down when printing a template.
      	(d_print_cast): Don't pass the modifier list down when printing a
      	template.
      	(d_print_mod_list): Temporarily set templates list while printing
      	a modifier.
      	(d_print_mod): Check that buf is not NULL before using it.
      	(d_print_function_type): Print parens if there is no modifier.
      	(d_init_info): Permit as many substitutions as there are
      	characters in the mangled name.
      	* testsuite/demangle-expected: Add two new test cases.
      
      From-SVN: r73970
      Ian Lance Taylor committed
  20. 25 Nov, 2003 1 commit
  21. 24 Nov, 2003 1 commit
  22. 21 Nov, 2003 2 commits
  23. 20 Nov, 2003 1 commit
  24. 19 Nov, 2003 1 commit
    • cp-demangle.c (demangle_operator_name): Remove space before "sizeof". · 820555e6
      	* cp-demangle.c (demangle_operator_name): Remove space before
      	"sizeof".
      	(demangle_type_ptr): Put qualifiers in the right place.  Handle
      	qualifiers in pointer to member specially.
      	(demangle_type): Handle qualifiers for pointer or reference
      	specially.  Handle function type.
      	(demangle_local_name): Save and restore caret around demangling of
      	initial encoding.
      
      From-SVN: r73723
      Ian Lance Taylor committed
  25. 12 Aug, 2003 1 commit
  26. 03 May, 2003 1 commit
  27. 20 Sep, 2002 1 commit
    • cp-demangle.c (demangling_new): Cast 0 to enum. · f08b7eee
      	* cp-demangle.c (demangling_new): Cast 0 to enum.
      	(demangle_char): Cast return of strdup to char *.
      	(is_gnu_v3_mangled_ctor): Cast 0 to enum.
      	(is_gnu_v3_mangled_dtor): Likewise.
      	* cplus-dem.c (grow_vect): Cast return of xrealloc to void *.
      	(work_stuff_copy_to_from): Cast return of xmalloc to char **.
      	* fibheap.c (fibnode_new): Cast return of xcalloc to fibnode_t.
      	* md5.c (md5_process_bytes): Cast results back to const void *.
      	(md5_process_block): Add cast to const md5_uint32 *.
      	* regex.c (re_compile_fastmap): Cast enum to UCHAR_T.
      	* safe-ctype.c (L, XL, U, XU, D, P, _, C, Z, M, V, T, S): Add cast to
      	unsigned short.
      	* splay-tree.c (splay_tree_xmalloc_allocate): Cast return of xmalloc
      	to void *.
      	* vasprintf.c (int_vasprintf): Cast return of malloc to char *.
      
      From-SVN: r57330
      John David Anglin committed
  28. 09 Jul, 2002 2 commits
  29. 02 Jul, 2002 1 commit
  30. 01 Apr, 2002 1 commit
  31. 30 Mar, 2002 1 commit
  32. 12 Mar, 2002 1 commit