- 27 Jan, 2016 3 commits
-
-
libiberty/ChangeLog: 2016-01-26 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_call_convention): Handle extern Objective-C function calling convention. (dlang_call_convention_p): Likewise. (dlang_type): Likewise. * testsuite/d-demangle-expected: Add coverage tests. From-SVN: r232864
Iain Buclaw committed -
d-demangle.c (dlang_function_args): Append ',' for variadic functions only if parameters were seen before the... libiberty/ChangeLog: 2016-01-26 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_function_args): Append ',' for variadic functions only if parameters were seen before the elipsis symbol. * testsuite/d-demangle-expected: Add coverage test for parameter-less variadic functions. From-SVN: r232863
Iain Buclaw committed -
d-demangle.c (dlang_type): Handle function types only in the context of seeing a pointer type symbol. libiberty/ChangeLog: 2016-01-27 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_type): Handle function types only in the context of seeing a pointer type symbol. * testsuite/d-demangle-expected: Update function pointer tests. From-SVN: r232862
Iain Buclaw committed
-
- 05 Jan, 2016 2 commits
-
-
Would be more useful if we could use "const char * const *", but there's a long standing bug where gcc warns about incompatible pointers when you try to pass in "char **". We can at least constify the array itself as gcc will not warn in that case. From-SVN: r232089
Mike Frysinger committed -
This func is basically open coding the xstrdup function, so gut it and use that directly. From-SVN: r232086
Mike Frysinger committed
-
- 28 Dec, 2015 1 commit
-
-
libiberty/ChangeLog; * crc32.c: In the documentation, don't refer to GDB's now-nonexistent crc32 implementation. In the table-generation program embedded within the documentation, change the type of the induction variables i and j from int to unsigned int, to avoid undefined behavior. From-SVN: r231983
Patrick Palka committed
-
- 21 Dec, 2015 1 commit
-
-
PR 66827 * regex.c (EXTRACT_NUMBER): Cast sign byte to unsigned before left shifting. From-SVN: r231873
Nick Clifton committed
-
- 27 Nov, 2015 1 commit
-
-
The fix for bug 59195: [C++ demangler handles conversion operator incorrectly] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59195 unfortunately makes the demangler crash due to infinite recursion, in case of casts in template parameters. For example, with: template<int> struct A {}; template <typename Y> void function_temp(A<sizeof ((Y)(999))>) {} template void function_temp<int>(A<sizeof (int)>); The 'function_temp<int>' instantiation above mangles to: _Z13function_tempIiEv1AIXszcvT_Li999EEE The demangler parses this as: typed name template name 'function_temp' template argument list builtin type int function type builtin type void argument list template (*) name 'A' template argument list unary operator operator sizeof unary operator cast template parameter 0 (**) literal builtin type int name '999' And after the fix for 59195, due to: static void d_print_cast (struct d_print_info *dpi, int options, const struct demangle_component *dc) { ... /* For a cast operator, we need the template parameters from the enclosing template in scope for processing the type. */ if (dpi->current_template != NULL) { dpt.next = dpi->templates; dpi->templates = &dpt; dpt.template_decl = dpi->current_template; } when printing the template argument list of A (what should be "<sizeof (int)>"), the template parameter 0 (that is, "T_", the '**' above) now refers to the first parameter of the the template argument list of the 'A' template (the '*' above), exactly what we were already trying to print. This leads to infinite recursion, and stack exaustion. The template parameter 0 should actually refer to the first parameter of the 'function_temp' template. Where it reads "for the cast operator" in the comment in d_print_cast (above), it's really talking about a conversion operator, like: struct A { template <typename U> explicit operator U(); }; We don't want to inject the template parameters from the enclosing template in scope when processing a cast _expression_, only when handling a conversion operator. The problem is that DEMANGLE_COMPONENT_CAST is currently ambiguous, and means _both_ 'conversion operator' and 'cast expression'. Fix this by adding a new DEMANGLE_COMPONENT_CONVERSION component type, which does what DEMANGLE_COMPONENT_CAST does today, and making DEMANGLE_COMPONENT_CAST just simply print its component subtree. I think we could instead reuse DEMANGLE_COMPONENT_CAST and in d_print_comp_inner still do: @@ -5001,9 +5013,9 @@ d_print_comp_inner (struct d_print_info *dpi, int options, d_print_comp (dpi, options, dc->u.s_extended_operator.name); return; case DEMANGLE_COMPONENT_CAST: d_append_string (dpi, "operator "); - d_print_cast (dpi, options, dc); + d_print_conversion (dpi, options, dc); return; leaving the unary cast case below calling d_print_cast, but seems to me that spliting the component types makes it easier to reason about the code. g++'s testsuite actually generates three symbols that crash the demangler in the same way. I've added those as tests in the demangler testsuite as well. And then this fixes PR other/61233 too, which happens to be a demangler crash originally reported to GDB, at: https://sourceware.org/bugzilla/show_bug.cgi?id=16957 Bootstrapped and regtested on x86_64 Fedora 20. Also ran this through GDB's testsuite. GDB will require a small update to use DEMANGLE_COMPONENT_CONVERSION in one place it's using DEMANGLE_COMPONENT_CAST in its sources. libiberty/ 2015-11-27 Pedro Alves <palves@redhat.com> PR other/61321 PR other/61233 * demangle.h (enum demangle_component_type) <DEMANGLE_COMPONENT_CONVERSION>: New value. * cp-demangle.c (d_demangle_callback, d_make_comp): Handle DEMANGLE_COMPONENT_CONVERSION. (is_ctor_dtor_or_conversion): Handle DEMANGLE_COMPONENT_CONVERSION instead of DEMANGLE_COMPONENT_CAST. (d_operator_name): Return a DEMANGLE_COMPONENT_CONVERSION component if handling a conversion. (d_count_templates_scopes, d_print_comp_inner): Handle DEMANGLE_COMPONENT_CONVERSION. (d_print_comp_inner): Handle DEMANGLE_COMPONENT_CONVERSION instead of DEMANGLE_COMPONENT_CAST. (d_print_cast): Rename as ... (d_print_conversion): ... this. Adjust comments. (d_print_cast): Rewrite - simply print the left subcomponent. * cp-demint.c (cplus_demangle_fill_component): Handle DEMANGLE_COMPONENT_CONVERSION. * testsuite/demangle-expected: Add tests. From-SVN: r231020
Pedro Alves committed
-
- 12 Nov, 2015 1 commit
-
-
From-SVN: r230270
Mike Stump committed
-
- 09 Nov, 2015 5 commits
-
-
Missed from last patch * config.in: Regenerate. From-SVN: r229991
Alan Modra committed -
* configure.ac: Check size of size_t. * configure: Regenerate. From-SVN: r229990
Alan Modra committed -
* obstack.c (_obstack_newchunk): Silence -Wc++compat warning. (_obstack_begin_worker): Likewise. Move assignment to h->chunk after alloc failure check. From-SVN: r229989
Alan Modra committed -
Using the standard gnulib obstack source requires importing quite a lot of other files from gnulib, and requires build changes. include/ * obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE. libiberty/ * obstack.c (__alignof__): Expand alignof_type from alignof.h. (obstack_exit_failure): Don't use exitfail.h. (_): Include libintl.h when HAVE_LIBINTL_H and nls enabled. Provide default. Don't include gettext.h. (_Noreturn): Define. * obstacks.texi: Adjust node references to external libc info files. From-SVN: r229988
Alan Modra committed -
This copies obstack.[ch] from gnulib, and updates the docs. The next patch should be applied if someone repeats the import at a later date. include/ * obstack.h: Import current gnulib file. libiberty/ * obstack.c: Import current gnulib file. * obstacks.texi: Updated doc, from glibc's manual/memory.texi. From-SVN: r229987
Alan Modra committed
-
- 06 Nov, 2015 1 commit
-
-
libiberty/ChangeLog: * configure.ac: Set AC_CV_FUNC_GETPAGESIZE to "yes" on Android hosts. * configure: Regenerate. From-SVN: r229893
Joel Brobecker committed
-
- 28 Oct, 2015 1 commit
-
-
gcc/c/ * Make-lang.in (c.tags): Also include libcpp TAGS. gcc/cp/ * Make-lang.in (c++.tags): Also include libcpp TAGS. From-SVN: r229504
Jason Merrill committed
-
- 18 Oct, 2015 1 commit
-
-
include/ Roland McGrath <roland@gnu.org> PR other/63758 * environ.h: New file. libiberty/ Roland McGrath <roland@gnu.org> Iain Sandoe <iain@codesourcery.com> PR other/63758 * pex-unix.c: Obtain the environment interface from settings in environ.h rather than in-line code. Update copyright date. * setenv.c: Likewise. * xmalloc.c: Likewise. Co-Authored-By: Iain Sandoe <iain@codesourcery.com> From-SVN: r228942
Roland McGrath committed
-
- 04 Oct, 2015 1 commit
-
-
gcc/ * builtins.def (BUILT_IN_ABORT): Add transaction_pure attribute. gcc/c-family/ * c-common.c (c_common_reswords): Add C++ TM TS keywords. (c_common_attribute_table): Add transaction_safe_dynamic. transaction_safe now affects type identity. (handle_tm_attribute): Handle transaction_safe_dynamic. * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT, RID_ATOMIC_CANCEL, RID_SYNCHRONIZED. (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED. (D_TRANSMEM): New. * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory. * c-pretty-print.c (pp_c_attributes_display): Don't print transaction_safe in C++. gcc/c/ * c-parser.c (c_lex_one_token): Handle @synchronized. * c-decl.c (match_builtin_function_types): A declaration of a built-in can change whether the function is transaction_safe. gcc/cp/ * cp-tree.h (struct cp_declarator): Add tx_qualifier field. (BCS_NORMAL, BCS_TRANSACTION): New enumerators. * lex.c (init_reswords): Limit TM kewords to -fgnu-tm. * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized. (make_call_declarator): Take tx_qualifier. (cp_parser_tx_qualifier_opt): New. (cp_parser_lambda_declarator_opt): Use it. (cp_parser_direct_declarator): Likewise. (cp_parser_statement): Handle atomic_noexcept, atomic_cancel. (cp_parser_compound_statement): Change in_try parameter to bcs_flags. (cp_parser_std_attribute): Map optimize_for_synchronized to transaction_callable. (cp_parser_transaction): Take the token. Handle atomic_noexcept. * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety. * call.c (enum conversion_kind): Add ck_tsafe. (standard_conversion): Handle transaction-safety conversion. (convert_like_real, resolve_address_of_overloaded_function): Likewise. (check_methods): Diagnose transaction_safe_dynamic on non-virtual function. (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic. * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant) (can_convert_tx_safety): New. * typeck.c (composite_pointer_type): Handle transaction-safety. * name-lookup.h (enum scope_kind): Add sk_transaction. * name-lookup.c (begin_scope): Handle it. * semantics.c (begin_compound_stmt): Pass it. * decl.c (check_previous_goto_1): Check it. (struct named_label_entry): Add in_transaction_scope. (poplevel_named_label_1): Set it. (check_goto): Check it. (duplicate_decls): A specialization can be transaction_safe independently of its template. (grokdeclarator): Handle tx-qualifier. * rtti.c (ptr_initializer): Handle transaction-safe. * search.c (check_final_overrider): Check transaction_safe_dynamic. Don't check transaction_safe. * mangle.c (write_function_type): Mangle transaction_safe here. (write_CV_qualifiers_for_type): Not here. (write_type): Preserve transaction_safe when stripping attributes. * error.c (dump_type_suffix): Print transaction_safe. libiberty/ * cp-demangle.c (d_cv_qualifiers): Dx means transaction_safe. (cplus_demangle_type): Let d_cv_qualifiers handle it. (d_dump, d_make_comp, has_return_type, d_encoding) (d_count_templates_scopes, d_print_comp_inner) (d_print_mod_list, d_print_mod, d_print_function_type) (is_ctor_or_dtor): Handle DEMANGLE_COMPONENT_TRANSACTION_SAFE. From-SVN: r228462
Jason Merrill committed
-
- 15 Aug, 2015 1 commit
-
-
* cp-demangle.c (d_abi_tags): Preserve di->last_name across any ABI tags. From-SVN: r226910
Ian Lance Taylor committed
-
- 11 Aug, 2015 1 commit
-
-
2015-08-11 Iain Buclaw <ibuclaw@gdcproject.org> libiberty/ * d-demangle.c (dlang_parse_real): Remove call to strtod. (strtod): Remove declaration. * testsuite/d-demangle-expected: Update float and complex literal tests to check correct hexadecimal demangling. From-SVN: r226774
Iain Buclaw committed
-
- 13 Jul, 2015 1 commit
-
-
libiberty/ * cp-demangle.c (d_dump): Fix syntax error. (d_identifier): Adjust type of len to match d_source_name. (d_expression_1): Fix out-of-bounds access. Check code variable for NULL before dereferencing it. (d_find_pack): Do not recurse for FIXED_TYPE, DEFAULT_ARG and NUMBER. (d_print_comp_inner): Add NULL pointer check. * cp-demangle.h (d_peek_next_char): Define as inline function when CHECK_DEMANGLER is defined. (d_advance): Likewise. * testsuite/demangle-expected: Add new testcases. From-SVN: r225727
Mikhail Maltsev committed
-
- 09 Jul, 2015 1 commit
-
-
* getruntime.c (RUSAGE_SELF): Define if not already defined. (get_runtime): Use RUSAGE_SELF as argument 1 of getrusage call. From-SVN: r225614
Uros Bizjak committed
-
- 08 Jul, 2015 1 commit
-
-
* getruntime.c (get_run_time) [__USE_GNU]: Use RUSAGE_SELF as argument 1 of getrusage call. From-SVN: r225534
Uros Bizjak committed
-
- 02 Jun, 2015 1 commit
-
-
PR c++/44282 gcc/cp/ * mangle.c (attr_strcmp): New. (write_CV_qualifiers_for_type): Also write out attributes that affect type identity. (write_type): Strip all attributes after writing qualifiers. libiberty/ * cp-demangle.c (cplus_demangle_type): Handle arguments to vendor extended qualifier. From-SVN: r224007
Jason Merrill committed
-
- 22 May, 2015 1 commit
-
-
include/: * libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is not defined. libiberty/: * configure.ac: Add AC_GNU_SOURCE. * Makefile.in (COMPILE.c): Add -D_GNU_SOURCE. * configure, config.in: Rebuild. * floatformat.c (_GNU_SOURCE): Don't define if already defined. From-SVN: r223589
Yunlian Jiang committed
-
- 16 May, 2015 8 commits
-
-
libiberty/ChangeLog: 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_symbol_kinds): New enum. (dlang_parse_symbol): Update signature. Handle an ambiguity between pascal functions and template value arguments. Only check for a type if parsing a function, or at the top level. Return failure if the entire symbol was not successfully demangled. (dlang_identifier): Update signature. Handle an ambiguity between two adjacent digits in a mangled symbol string. (dlang_type): Update call to dlang_parse_symbol. (dlang_template_args): Likewise. (dlang_parse_template): Likewise. (dlang_demangle): Likewise. * testsuite/d-demangle-expected: Fix bad tests found, and add problematic examples to the unittests. From-SVN: r223247
Iain Buclaw committed -
libiberty/ChangeLog: 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_template_args): Skip over specialized template parameters in mangled symbol. * testsuite/d-demangle-expected: Add coverage and unittest for specialized template parameters. From-SVN: r223246
Iain Buclaw committed -
libiberty/ChangeLog: 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_type): Handle cent and ucent types. * testsuite/d-demangle-expected: Add coverage tests for cent and ucent. From-SVN: r223245
Iain Buclaw committed -
d-demangle.c (dlang_attributes): Handle return attributes, ignoring return parameters in the mangled string. libiberty/ChangeLog: 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_attributes): Handle return attributes, ignoring return parameters in the mangled string. Return NULL if have encountered an unknown attribute. (dlang_function_args): Handle return parameters in the mangled string. * testsuite/d-demangle-expected: Add coverage tests for functions with return parameters and return attributes. From-SVN: r223244
Iain Buclaw committed -
d-demangle.c (dlang_identifier): Check encoded length of identifier to verify strncmp matches entire string. libiberty/ChangeLog: 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_identifier): Check encoded length of identifier to verify strncmp matches entire string. * testsuite/d-demangle-expected: Fix wrong test for postblit symbol. From-SVN: r223243
Iain Buclaw committed -
libiberty/ChangeLog: 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_type_modifiers): New function. (dlang_type_modifier_p): New function. (dlang_call_convention_p): Ignore any kind of type modifier. (dlang_type): Handle and emit the type modifier after delegate types. (dlang_parse_symbol): Handle and emit the type modifier after the symbol. * testsuite/d-demangle-expected: Add coverage tests for all valid usages of function symbols with type modifiers. From-SVN: r223242
Iain Buclaw committed -
d-demangle.c (dlang_call_convention): Return NULL if have reached the end of the symbol, but expected something to read. libiberty/ChangeLog: 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_call_convention): Return NULL if have reached the end of the symbol, but expected something to read. (dlang_attributes): Likewise. (dlang_function_type): Likewise. (dlang_type): Likewise. (dlang_identifier): Likewise. (dlang_value): Likewise. From-SVN: r223241
Iain Buclaw committed -
d-demangle.c (dlang_parse_string): Represent embedded whitespace or non-printable characters as hex or escape... libiberty/ChangeLog: 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_parse_string): Represent embedded whitespace or non-printable characters as hex or escape sequences. * testsuite/d-demangle-expected: Add test for templates with tabs and newlines embedded into the signature. From-SVN: r223240
Iain Buclaw committed
-
- 08 May, 2015 1 commit
-
-
libiberty/ChangeLog: * mkstemps.c: #include <time.h> if HAVE_TIME_H is defined but not HAVE_SYS_TIME_H. (fixes a build failure on LynxOS-178) From-SVN: r222918
Joel Brobecker committed
-
- 22 Apr, 2015 1 commit
-
-
2015-04-22 Eli Zaretskii <eliz@gnu.org> * strerror.c <sys_nerr, sys_errlist>: Declare only if they aren't macros. * setenv.c <environ>: Declare only if not a macro. From-SVN: r222335
Eli Zaretskii committed
-
- 14 Apr, 2015 1 commit
-
-
2015-04-14 Max Ostapenko <m.ostapenko@partner.samsung.com> * Makefile.tpl (EXTRA_HOST_EXPORTS): New variables. (EXTRA_BOOTSTRAP_FLAGS): Likewise. (check-[+module+]): Add EXTRA_HOST_EXPORTS and EXTRA_BOOTSTRAP_FLAGS. * Makefile.in: Regenerate. libiberty/ * testsuite/Makefile.in (LIBCFLAGS): Add LDFLAGS. From-SVN: r222099
Max Ostapenko committed
-
- 10 Apr, 2015 1 commit
-
-
re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.) PR target/65351 config/ * mh-darwin: Only apply -mdynamic-no-pic for m32 Darwin when the compiler in use supports -mno-dynamic-no-pic. * picflag.m4: Only append -mno-dynamic-no-pic for Darwin when -mdynamic-no-pic is present in CFLAGS. libiberty/ * configure: Regenerate. libada/ * configure: Regenerate. libgcc/ * configure: Regenerate. gcc/ * configure: Regenerate. Co-Authored-By: Iain Sandoe <iain@codesourcery.com> From-SVN: r221967
Jakub Jelinek committed
-
- 07 Apr, 2015 1 commit
-
-
re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.) PR target/65351 config/ * picflag.m4: Append -mno-dynamic-no-pic for Darwin. libiberty/ * configure: Regenerate. libada/ * configure: Regenerate. libgcc/ * configure: Regenerate. gcc/ * configure: Regenerate. Co-Authored-By: Iain Sandoe <iain@codesourcery.com> From-SVN: r221891
Jakub Jelinek committed
-
- 19 Jan, 2015 1 commit
-
-
This fixes a MinGW warning in libiberty/strerror.c 2015-01-19 Eli Zaretskii <eliz@gnu.org> * strerror.c <sys_nerr, sys_errlist>: Declare only if they aren't macros. From-SVN: r219849
Eli Zaretskii committed
-
- 24 Dec, 2014 1 commit
-
-
libiberty/ChangeLog: * xasprintf.c: New file. * Makefile.in (CFILES): Add xasprintf.c. (REQUIRED_OFILES): Add xasprintf.$(objext). (xasprintf.$(objext)): New target. * functions.texi: Regenerate. include/ChangeLog: * libiberty.h (xasprintf): Declare. gcc/ChangeLog: * gengtype.h (xasprintf): Remove declaration. * gengtype.c (xasprintf): Remove. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org> From-SVN: r219060
Uros Bizjak committed
-