1. 28 Feb, 2018 30 commits
  2. 27 Feb, 2018 10 commits
    • Avoid including <string> directly. · 2211eff6
      From-SVN: r258046
      Martin Sebor committed
    • PR c++/83871 - wrong code for attribute const and pure on distinct template specializations · d4cfd486
      PR c++/83871 - wrong code for attribute const and pure on distinct template specializations
      PR c++/83503 - [8 Regression] bogus -Wattributes for const and pure on function template specialization
      
      gcc/ChangeLog:
      
      	PR c++/83871
      	* gcc/doc/invoke.texi (-Wmissing-attributes): New option.
      	* gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
      
      gcc/c-family/ChangeLog:
      
      	PR c++/83871
      	* c.opt (-Wmissing-attributes): New option.
      
      gcc/cp/ChangeLog:
      
      	PR c++/83871
      	PR c++/83503
      	* cp-tree.h (warn_spec_missing_attributes): New function.
      	((check_explicit_specialization): Add an argument.  Call the above
      	function.
      	* decl.c (duplicate_decls): Avoid applying primary function template's
      	attributes to its explicit specializations.
      	cp/pt.c (warn_spec_missing_attributes): Define.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/83871
      	PR c++/83503
      	* g++.dg/Wmissing-attributes.C: New test.
      	* g++.dg/ext/attr-const-pure.C: New test.
      	* g++.dg/ext/attr-const.C: New test.
      	* g++.dg/ext/attr-deprecated-2.C: New test.
      	* g++.dg/ext/attr-malloc-2.C: New test.
      	* g++.dg/ext/attr-malloc.C: New test.
      	* g++.dg/ext/attr-noinline-2.C: New test.
      	* g++.dg/ext/attr-noinline.C: New test.
      	* g++.dg/ext/attr-nonnull.C: New test.
      	* g++.dg/ext/attr-noreturn-2.C: New test.
      	* g++.dg/ext/attr-noreturn.C: New test.
      	* g++.dg/ext/attr-nothrow-2.C: New test.
      	* g++.dg/ext/attr-nothrow.C: New test.
      	* g++.dg/ext/attr-optimize.C: New test.
      	* g++.dg/ext/attr-pure.C: New test.
      	* g++.dg/ext/attr-returns-nonnull.C: New test.
      	* g++.dg/ext/attr-warning.C: New test.
      
      From-SVN: r258045
      Martin Sebor committed
    • PR translation/84207 - Hard coded plural in gimple-fold.c · 1c89478a
      gcc/ChangeLog:
      
      	PR translation/84207
      	* diagnostic-core.h (warning_n, error_n, inform_n): Change
      	n argument to unsigned HOST_WIDE_INT.
      	* diagnostic.c (warning_n, error_n, inform_n): Ditto.
      	(diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
      	* gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
      	* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
      
      From-SVN: r258044
      Martin Sebor committed
    • PR c++/71546 - lambda init-capture with qualified-id. · 76bd270a
      	* parser.c (cp_parser_lambda_introducer): Clear scope after
      	each lambda capture.
      
      From-SVN: r258043
      Håkon Sandsmark committed
    • [PR c++/84426] ICE after conflicting member decl · 10b5c982
      https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01529.html
      	PR c++/84426
      	* name-lookup.h (get_member_slot): Rename ...
      	(find_member_slot): ... here.
      	(add_member_slot): New.
      	* name-lookup.c (member_vec_linear_search): No need to check for
      	NULL slot.
      	(get_member_slot): Rename ...
      	(find_member_slot): ... here.  Don't add slot for incomplete class.
      	(add_member_slot): New.
      	* class.c (add_method): Adjust get_member_slot rename.  Bail out
      	if push_class_level_binding fails.  Create slot and grok
      	properties once we're committed to insertion.
      
      	PR c++/84426
      	* g++.dg/lookup/pr84426.C: New.
      
      From-SVN: r258042
      Nathan Sidwell committed
    • * cp-tree.h: Adjust comment. · 7f7e718d
      From-SVN: r258040
      Jason Merrill committed
    • PR c++/84489 - dependent default template argument · e8ef9fdf
      	* pt.c (type_unification_real): Handle early substitution failure.
      
      From-SVN: r258039
      Jason Merrill committed
    • re PR tree-optimization/84512 (Missed optimization: should be precalculated in compile-time) · b1ddb654
      2018-02-27  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/84512
      	* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
      	Do not use the estimate returned from record_stmt_cost for
      	the scalar iteration cost but sum properly using add_stmt_cost.
      
      	* gcc.dg/tree-ssa/pr84512.c: New testcase.
      
      From-SVN: r258036
      Richard Biener committed
    • re PR libgomp/84466 (libgomp.graphite/force-parallel-8.c fails starting with r257723) · c16d3e3c
      2018-02-27  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/84466
      	* graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
      	Adjust last change to less strictly validate use operands.
      
      From-SVN: r258035
      Richard Biener committed
    • Make groups more generic (PR gcov-profile/84548). · e59b5e24
      2018-02-27  Martin Liska  <mliska@suse.cz>
      
      	PR gcov-profile/84548
      	* gcov.c (process_file): Allow partial overlap and consider it
      	also as group functions.
      	(output_lines): Properly calculate range of lines for a group.
      2018-02-27  Martin Liska  <mliska@suse.cz>
      
      	PR gcov-profile/84548
      	* g++.dg/gcov/pr84548.C: New test.
      
      From-SVN: r258033
      Martin Liska committed