1. 18 Dec, 2019 33 commits
  2. 17 Dec, 2019 7 commits
    • PR c++/61339 - add warning for mismatch between struct and class · e8f1ade2
      gcc/c-family/ChangeLog:
      
      	PR c++/61339
      	* c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
      
      gcc/cp/ChangeLog:
      
      	PR c++/61339
      	* parser.c (cp_parser_maybe_warn_enum_key): New function.
      	(class_decl_loc_t): New class.
      	(cp_parser_elaborated_type_specifier): Call
      	cp_parser_maybe_warn_enum_key.
      	(cp_parser_class_head): Call cp_parser_check_class_key.
      	(cp_parser_check_class_key): Add arguments.  Call class_decl_loc_t::add.
      	(c_parse_file): Call class_decl_loc_t::diag_mismatched_tags.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/61339
      	* g++.dg/warn/Wmismatched-tags.C: New test.
      	* g++.dg/warn/Wredundant-tags.C: New test.
      	* g++.dg/pch/Wmismatched-tags.C: New test.
      	* g++.dg/pch/Wmismatched-tags.Hs: New test header.
      
      gcc/ChangeLog:
      
      	PR c++/61339
      	* doc/invoke.texi (-Wmismatched-tags, -Wredundant-tags): Document
      	new C++ options.
      
      From-SVN: r279480
      Martin Sebor committed
    • Generate PADDI to add large constants if -mcpu=future. · 54ba911f
      2019-12-12  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/predicates.md (add_operand): Allow eI constants.
      	* config/rs6000/rs6000.md (add<mode>3): Add alternative to
      	generate PADDI for 34-bit constants if -mcpu=future.
      
      From-SVN: r279476
      Michael Meissner committed
    • Use PLI to load up 32-bit SImode constants if -mcpu=future. · ef759fd1
      2019-12-17  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/rs6000.md (movsi_internal1): Add alternative to
      	use PLI to load up 32-bit constants if -mcpu=future.
      
      From-SVN: r279475
      Michael Meissner committed
    • Use PLI to load up large constants if -mcpu=future. · a50e0388
      2019-12-17  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/rs6000.c (num_insns_constant_gpr): Return 1 if the
      	constant can be loaded with PLI if -mcpu=future.
      	* config/rs6000/rs6000.md (movdi_internal64): Add alternative to
      	use PLI to load up 34-bit constants if -mcpu=future.
      
      From-SVN: r279474
      Michael Meissner committed
    • PR c++/79592 - missing explanation of invalid constexpr. · 4f05d85a
      We changed months back to use the pre-generic form for constexpr evaluation,
      but explain_invalid_constexpr_fn was still using DECL_SAVED_TREE.  This
      mostly works, but misses some issues due to folding.  So with this patch we
      save the pre-generic form of constexpr functions even when we know they
      can't produce a constant result.
      
      	* constexpr.c (register_constexpr_fundef): Do store the body of a
      	template instantiation that is not potentially constant.
      	(explain_invalid_constexpr_fn): Look it up.
      	(cxx_eval_call_expression): Check fundef->result.
      
      From-SVN: r279473
      Jason Merrill committed
    • PR c++/92576 - redeclaration of variable template. · 9c7b2b0b
      The variable templates patch way back when forgot to add handling here.  The
      simplest answer seems to be recursing to the underlying declaration.
      
      	* decl.c (redeclaration_error_message): Recurse for variable
      	templates.
      
      From-SVN: r279472
      Jason Merrill committed
    • * name-lookup.c (get_std_name_hint): Add std::byte. · 490a091f
      From-SVN: r279471
      Jason Merrill committed