aboutsummaryrefslogtreecommitdiff
path: root/libiberty
AgeCommit message (Collapse)AuthorFilesLines
2013-10-29re PR tree-optimization/58689 ([meta-bug] __attribute__((returns_nonnull)) ↵Marc Glisse2-14/+7
enhancements) 2013-10-29 Marc Glisse <marc.glisse@inria.fr> PR tree-optimization/58689 include/ * ansidecl.h (ATTRIBUTE_RETURNS_NONNULL): New macro. * libiberty.h (basename, lbasename, dos_lbasename, unix_lbasename, concat_copy): Mark with attributes nonnull(1) and returns_nonnull. (concat, reconcat, concat_copy2, choose_temp_base, xstrerror, xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init): Mark with attribute returns_nonnull. libiberty/ * concat.c: Remove note about xmalloc. From-SVN: r204159
2013-10-27* testsuite/test-demangle.c: Include unistd.h.Gerald Pfeifer2-0/+7
From-SVN: r204107
2013-10-25cp-demangle.c (struct d_saved_scope): New structure.Gary Benson3-2/+149
libiberty/ 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. From-SVN: r204068
2013-10-23* testsuite/test-expandargv.c: Include unistd.h.Gerald Pfeifer2-0/+7
From-SVN: r203993
2013-10-23Fix up ChangeLog entries (name, e-mail, formatting, otherwise).Gerald Pfeifer1-3/+3
From-SVN: r203992
2013-10-15Add --enable-host-shared configuration optionDavid Malcolm3-0/+17
/ * configure.ac: Add --enable-host-shared * configure: Regenerate. gcc/ * Makefile.in (PICFLAG): New. (enable_host_shared): New. (INTERNAL_CFLAGS): Use PICFLAG. (LIBIBERTY): Use pic build of libiberty.a if configured with --enable-host-shared. * configure.ac: Add --enable-host-shared, setting up new PICFLAG variable. * configure: Regenerate. * doc/install.texi (--enable-shared): Add note contrasting it with... (--enable-host-shared): New option. libbacktrace/ * configure.ac: Add --enable-host-shared, setting up pre-existing PIC_FLAG variable within Makefile.am et al. * configure: Regenerate. libcpp/ * Makefile.in (PICFLAG): New. (ALL_CFLAGS): Add PICFLAG. (ALL_CXXFLAGS): Likewise. * configure.ac: Add --enable-host-shared, setting up new PICFLAG variable. * configure: Regenerate. libdecnumber/ * Makefile.in (PICFLAG): New. (ALL_CFLAGS): Add PICFLAG. * configure.ac: Add --enable-host-shared, setting up new PICFLAG variable. * configure: Regenerate. libiberty/ * configure.ac: If --enable-host-shared, use -fPIC. * configure: Regenerate. zlib/ * configure.ac: Add --enable-host-shared, setting up new PICFLAG variable. * Makefile.am: Add PICFLAG to libz_a_CFLAGS. * Makefile.in: Regenerate. * configure: Regenerate. From-SVN: r203632
2013-10-11cp-demangle.c (d_name): Demangle local-source-names.Paul Pluzhnikov3-1/+9
2013-10-11 Paul Pluzhnikov <ppluzhnikov@google.com> * cp-demangle.c (d_name): Demangle local-source-names. * testsuite/demangle-expected: New test. From-SVN: r203476
2013-09-12ChangeLog: Add missing file to two entries.Gary Benson1-0/+2
* libiberty/ChangeLog: Add missing file to two entries. From-SVN: r202526
2013-09-10re PR bootstrap/58386 (libstdc++.so.6: undefined symbol: htab_hash_pointer)Paolo Carlini3-170/+26
2013-09-10 Paolo Carlini <paolo.carlini@oracle.com> 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. From-SVN: r202480
2013-09-10cp-demangle.c: Include hashtab.h.Gary Benson3-2/+189
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. From-SVN: r202442
2013-08-20floatformat.h (floatformat_ibm_long_double): Delete.Alan Modra2-2/+17
include/ * floatformat.h (floatformat_ibm_long_double): Delete. (floatformat_ibm_long_double_big): Declare. (floatformat_ibm_long_double_little): Declare. libiberty/ * floatformat.c (floatformat_ibm_long_double): Rename to.. (floatformat_ibm_long_double_big): ..this. (floatformat_ibm_long_double_little): New. From-SVN: r201869
2013-07-22Fix typo.Mike Stump1-1/+1
From-SVN: r201139
2013-07-21Fix.Mike Stump1-1/+1
From-SVN: r201102
2013-07-09makefile.vms (OBJS): Add dwarfnames.objTristan Gingold2-1/+6
2013-07-09 Tristan Gingold <gingold@adacore.com> * makefile.vms (OBJS): Add dwarfnames.obj From-SVN: r200812
2013-06-01re PR other/56780 (--disable-install-libiberty still installs libiberty.a)Matt Burgess4-58/+80
PR other/56780 * libiberty/configure.ac: Move test for --enable-install-libiberty outside of the 'with_target_subdir' test so that it actually gets run. Add output messages to show the test result. * libiberty/configure: Regenerate. * libiberty/Makefile.in (install_to_libdir): Place the installation of the libiberty library in the same guard as that used for the headers to prevent it being installed unless requested via --enable-install-libiberty. From-SVN: r199570
2013-05-06hashtab.c (hash_pointer): Remove conditional and avoid unexecuted shift ↵David Edelsohn2-11/+10
equal to wordsize. 2013-05-06 David Edelsohn <dje.gcc@gmail.com> Peter Bergner <bergner@vnet.ibm.com> Segher Boessenkool <segher@kernel.crashing.org> Jakub Jelinek <jakub@redhat.com> * hashtab.c (hash_pointer): Remove conditional and avoid unexecuted shift equal to wordsize. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> Co-Authored-By: Peter Bergner <bergner@vnet.ibm.com> Co-Authored-By: Segher Boessenkool <segher@kernel.crashing.org> From-SVN: r198633
2013-04-23Improve pointer hash function to include all bitsAndi Kleen2-8/+29
The hashtab pointer hash function is not very good. It throws most of the bits in the pointer away. This changes pointer_hash to use the mix code from jhash function that mixes all the bits on the pointer and makes them dependent on each other, before doing the modulo. libiberty/: 2013-04-22 Andi Kleen <ak@linux.intel.com> * hashtab.c (hash_pointer): Move to end of file and reimplement. From-SVN: r198171
2013-04-03cp-demangle.c (cplus_demangle_type): Fix function quals.Jason Merrill3-44/+34
libiberty/ * 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. From-SVN: r197460
2013-04-03Demangle C++11 ref-qualifier.Jason Merrill3-13/+150
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. From-SVN: r197436
2013-03-27configure: Regenerated.Kai Tietz2-1/+7
* configure: Regenerated. From-SVN: r197177
2013-03-06make-obstacks-texi.pl: New.Tobias Burnus3-28/+31
contrib/ 2013-03-06 Tobias Burnus <burnus@net-b.de> * make-obstacks-texi.pl: New. libiberty/ 2013-03-06 Tobias Burnus <burnus@net-b.de> * libiberty.texi: Update comment, remove lowersections. * obstacks.texi: Regenerate. From-SVN: r196486
2013-03-05re PR middle-end/56526 (false positive for maybe-uninitialized)Jakub Jelinek2-1/+7
PR middle-end/56526 * simple-object-mach-o.c (simple_object_mach_o_segment): Initialize wrapper_sect_offset to avoid a warning. From-SVN: r196466
2013-03-01extended.texi (C Extensions): Change order in @menu to match @node.Tobias Burnus3-3/+11
gcc/ 2013-03-01 Tobias Burnus <burnus@net-b.de> * doc/extended.texi (C Extensions): Change order in @menu to match @node. (Other MIPS Built-in Functions): Move last MIPS entry before "picoChip Built-in Functions". (SH Built-in Functions): Move after RX Built-in Functions. * doc/gcc.texi (Introduction): Change order in @menu to match @node. * doc/md.texi (Constraints): Ditto. * gty.texi (Type Information): Ditto. (User-provided marking routines for template types): Make subsection. * doc/invoke.texi (AArch64 Options): Move before "Adapteva Epiphany Options". libiberty/ 2013-03-01 Andreas Schwab <schwab@linux-m68k.org> * obstacks.texi (Obstacks): Trim @node to only contain the node name. * libiberty.texi (Obstacks): Lower section. From-SVN: r196388
2013-02-14re PR c++/55223 ([C++11] Default lambda expression of a templated class member)Jason Merrill3-1/+28
PR c++/55223 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. From-SVN: r196065
2013-02-09re PR other/56245 (-fsanitize=address miscompiles GCC)Jakub Jelinek2-4/+12
PR other/56245 * regex.c (PTR_INT_TYPE): Define. (EXTEND_BUFFER): Change incr type from int to PTR_INT_TYPE. From-SVN: r195918
2013-01-31Correct ChangeLog's mentioned PR-number.Kai Tietz1-1/+1
From-SVN: r195607
2013-01-31re PR other/54620 (sha1.c has incorrect math if sizeof(size_t) is 8)Kai Tietz1-2/+1
PR other/54620 * sha1.c (sha1_process_block): Handle case that size_t is a wider-integer-scalar as a 32-bit unsigned integer. From-SVN: r195604
2013-01-31re PR other/54620 (sha1.c has incorrect math if sizeof(size_t) is 8)Kai Tietz1-0/+4
PR other/54620 * sha1.c (sha1_process_block): Handle case that size_t is a wider-integer-scalar as a 32-bit unsigned integer. From-SVN: r195603
2013-01-312013-01-31 Kai Tietz <ktietz@redhat.com>Kai Tietz2-2/+7
PR other/543413 * md5.c (md5_process_block): Handle case that size_t is a wider-integer-scalar a 32-bit unsigned integer. From-SVN: r195600
2013-01-04re PR other/54800 (libiberty/simple-object-mach-o.c:704: possible ↵Ian Lance Taylor2-2/+9
optimisation ?) PR other/54800 * simple-object-mach-o.c (simple_object_mach_o_segment): Don't bother to zero out a buffer we are about to set anyhow. From-SVN: r194914
2013-01-01simple-object-xcoff.c: New file.David Edelsohn5-2/+919
* simple-object-xcoff.c: New file. * Makefile.in: Add it to build machinery. * simple-object-common.h (simple_object_xcoff_functions): Declare. * simple-object.c (format_functions): Add simple_object_xcoff_functions. From-SVN: r194774
2012-11-10cp-demangle.c (d_unqualified_name): Handle abi tags here.Jason Merrill3-22/+24
* cp-demangle.c (d_unqualified_name): Handle abi tags here. (d_name): Not here. From-SVN: r193401
2012-11-09Add C++ attribute abi_tag and -Wabi-tag option.Jason Merrill2-5/+50
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. From-SVN: r193367
2012-10-08Allow dynamic initialization of thread_locals.Jason Merrill2-0/+31
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. From-SVN: r192211
2012-09-18strnlen.c: New file.Ian Lance Taylor8-22/+141
* strnlen.c: New file. * configure.ac: Check for strnlen, add it to AC_LIBOBJ if it's not present. * Makefile.in: Rebuild dependencies. (CFILES): Add strnlen.c. (CONFIGURED_OFILES): Add ./strnlen.$(objext). * configure, config.in, functions.texi: Rebuild. * maint-tool: Accept .def files in the include directory. From-SVN: r191432
2012-09-18PR other/54411: integer overflow in objalloc_allocFlorian Weimer2-2/+15
2012-09-18 Florian Weimer <fweimer@redhat.com> PR other/54411 * objalloc.h (objalloc_alloc): Do not use fast path on wraparound. 2012-09-18 Florian Weimer <fweimer@redhat.com> PR other/54411 * objalloc.c (_objalloc_alloc): Add overflow check covering alignment and CHUNK_HEADER_SIZE addition. From-SVN: r191413
2012-08-28Replace malloc with xmallocH.J. Lu2-38/+16
* argv.c (dupargv): Replace malloc with xmalloc. Don't check xmalloc return. (buildargv): Likewise. Also replace strdup with xstrdup. (expandargv): Don't check dupargv return. From-SVN: r190767
2012-08-28Replace alloca with xmalloc/freeH.J. Lu2-1/+8
PR binutils/14526 * argv.c (buildargv): Replace alloca with xmalloc/free. From-SVN: r190766
2012-08-17floatformat.c (floatformat_to_double): Correctly handle numbers between 1 and 2.Andreas Schwab2-24/+20
* floatformat.c (floatformat_to_double): Correctly handle numbers between 1 and 2. Simplify handling of denormal number. (main): Test with 1.1. From-SVN: r190493
2012-07-31md5.c (md5_finish_ctx): Declare swap_bytes.Mike Frysinger2-4/+13
2012-07-27 Mike Frysinger <vapier@gentoo.org> * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output to swap_bytes, and then call memcpy to move it to ctx->buffer. From-SVN: r189996
2012-07-26pex-win32.c (pex_win32_exec_child): Only close original file descriptors if ↵Kazu Hirata2-8/+23
child is launched successfully. 2012-07-26 Kazu Hirata <kazu@codesourcery.com> Sandra Loosemore <sandra@codesourcery.com> libiberty/ * pex-win32.c (pex_win32_exec_child): Only close original file descriptors if child is launched successfully. Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com> From-SVN: r189901
2012-07-18cp-demangle.c (cplus_demangle_operators): Add *_cast.Jason Merrill3-1/+40
* cp-demangle.c (cplus_demangle_operators): Add *_cast. (op_is_new_cast): New. (d_expression, d_print_comp): Check it. From-SVN: r189630
2012-07-13filenames.h: #include "hashtab.h".Doug Evans2-0/+53
include/ * filenames.h: #include "hashtab.h". (filename_hash, filename_eq): Declare. libiberty/ * filename_cmp.c (filename_hash, filename_eq): New functions. From-SVN: r189472
2012-06-29copying-lib.texi (Library Copying): Don't use @heading inside @enumerate.Andreas Schwab2-5/+5
* copying-lib.texi (Library Copying): Don't use @heading inside @enumerate. From-SVN: r189072
2012-05-22demangle-expected: Add regression test.Tom Tromey3-0/+12
http://sourceware.org/bugzilla/show_bug.cgi?id=14065 * testsuite/demangle-expected: Add regression test. * cp-demangle.c (d_find_pack): Return NULL for DEMANGLE_COMPONENT_UNNAMED_TYPE. From-SVN: r187773
2012-04-27dwarf2out.c (dwarf_stack_op_name): Use get_DW_OP_name.Tom Tromey3-3/+116
gcc * dwarf2out.c (dwarf_stack_op_name): Use get_DW_OP_name. (dwarf_tag_name): Use get_DW_TAG_name. (dwarf_attr_name): Use get_DW_AT_name. (dwarf_form_name): Use get_DW_FORM_name. * dwarf2cfi.c (dwarf_cfi_name): Use get_DW_CFA_name. include * dwarf2.h (enum dwarf_tag, enum dwarf_form, enum dwarf_attribute) (enum dwarf_location_atom, enum dwarf_type, enum dwarf_call_frame_info): Remove. (DW_TAG, DW_TAG_DUP, DW_FORM, DW_AT, DW_AT_DUP, DW_OP) (DW_OP_DUP, DW_ATE, DW_ATE_DUP, DW_CFA): New macros. Include dwarf2.def. (get_DW_TAG_name, get_DW_AT_name, get_DW_FORM_name) (get_DW_OP_name, get_DW_ATE_name): Declare. * dwarf2.def: New file, from dwarf2.h. libiberty * dwarfnames.c: New file. * Makefile.in (CFILES): Add dwarfnames. (REQUIRED_OFILES): Add dwarfnames. (./dwarfnames.$(objext)): New target. From-SVN: r186908
2012-04-04pex-unix.c (to_ptr32): Fix style.Tristan Gingold2-2/+8
2012-04-04 Tristan Gingold <gingold@adacore.com> * pex-unix.c (to_ptr32): Fix style. From-SVN: r186134
2012-04-02stack-limit.c: Includes ansidecl.h.Tristan Gingold2-1/+7
2012-04-02 Tristan Gingold <gingold@adacore.com> * stack-limit.c: Includes ansidecl.h. (stack_limit_increase): Add ATTRIBUTE_UNUSED From-SVN: r186064
2012-03-21mangle.c (write_type): Handle 'auto'.Jason Merrill3-0/+15
gcc/cp/ * 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'. From-SVN: r185595
2012-03-07cp-demangle.c (cplus_demangle_operators): Add li.Jason Merrill3-1/+15
* cp-demangle.c (cplus_demangle_operators): Add li. (d_unqualified_name): Handle it specially. From-SVN: r185082