public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/files/, sys-devel/gcc/
Date: Thu, 10 Apr 2025 17:50:59 +0000 (UTC)	[thread overview]
Message-ID: <1744307421.3ca9bf82275c086395e6947a5a2e9f1cc28134f1.sam@gentoo> (raw)

commit:     3ca9bf82275c086395e6947a5a2e9f1cc28134f1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 10 17:49:43 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 10 17:50:21 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ca9bf82

sys-devel/gcc: add two more fixes to latest 15 snapshot

I got pinged just in time after pushing 3438a1297763a879778b4a4c31e78d3eb333ed13.

* Add a fix for German locales

* Fix Qt 6.9 build

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/gcc-15.0.1_pre20250406-de-locale.patch   | 216 +++++++++++++++++++++
 .../gcc/files/gcc-15.0.1_pre20250406-qt.patch      |  77 ++++++++
 ...-r1.ebuild => gcc-15.0.1_pre20250406-r2.ebuild} |   2 +
 3 files changed, 295 insertions(+)

diff --git a/sys-devel/gcc/files/gcc-15.0.1_pre20250406-de-locale.patch b/sys-devel/gcc/files/gcc-15.0.1_pre20250406-de-locale.patch
new file mode 100644
index 000000000000..e0ccde38b94f
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-15.0.1_pre20250406-de-locale.patch
@@ -0,0 +1,216 @@
+https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1f32b87117b0e2ecc33b844d929d723de3fe8085
+
+From 1f32b87117b0e2ecc33b844d929d723de3fe8085 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Thu, 10 Apr 2025 18:39:52 +0200
+Subject: [PATCH] c++: Use G_ instead of _ around cp/errors.cc
+ gcc-internal-format strings [PR119684]
+
+These pp_printf/pp_verbatim format strings should be gcc-internal-format,
+they use the pretty-print.cc format specifier handling rather than libc
+*printf, but pp_printf/pp_verbatim are intentionally not handled through
+exgettext because not everything done through them should be translated
+(e.g. its use for dump files shouldn't be).
+In addition, composing translatable messages from
+"in requirements " and later on "with " might make it harder to be
+translated.
+
+I've verified these strings (at least those which don't use format
+specifiers added post GCC 4.3 which gettext doesn't handle) are properly
+marked as gcc-internal-format in gcc.pot.  The lack of that caused
+ICEs on German translation of the "%s%s%sIn instantiation of %q#D:\n"
+message because it contained too many %s.
+
+2025-04-10  Jakub Jelinek  <jakub@redhat.com>
+
+	PR translation/119684
+	* error.cc (cp_print_error_function): Use G_ instead of _ for
+	pp_printf arguments.
+	(function_category): Use G_ instead of _.
+	(print_instantiation_full_context): Use G_ instead of _ in pp_verbatim
+	arguments.
+	(print_location): Likewise.
+	(print_instantiation_partial_context): Likewise.
+	(maybe_print_constexpr_context): Likewise.
+	(print_constrained_decl_info): Use G_() around pp_verbatim argument.
+	(print_concept_check_info): Likewise.
+	(print_constraint_context_head): Likewise.
+	(print_requires_expression_info): Likewise.  Merge separate pp_verbatim
+	"in requirements " and "with " into one with conditional messages.
+---
+ gcc/cp/error.cc | 59 ++++++++++++++++++++++++-------------------------
+ 1 file changed, 29 insertions(+), 30 deletions(-)
+
+diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc
+index ec7527e96d18..499eb1b15a85 100644
+--- a/gcc/cp/error.cc
++++ b/gcc/cp/error.cc
+@@ -3788,18 +3788,18 @@ cp_print_error_function (diagnostic_text_output_format &text_output,
+ 		    {
+ 		      if (text_output.show_column_p () && s.column != 0)
+ 			pp_printf (pp,
+-				   _("    inlined from %qD at %r%s:%d:%d%R"),
++				   G_("    inlined from %qD at %r%s:%d:%d%R"),
+ 				   fndecl,
+ 				   "locus", s.file, s.line, s.column);
+ 		      else
+ 			pp_printf (pp,
+-				   _("    inlined from %qD at %r%s:%d%R"),
++				   G_("    inlined from %qD at %r%s:%d%R"),
+ 				   fndecl,
+ 				   "locus", s.file, s.line);
+ 
+ 		    }
+ 		  else
+-		    pp_printf (pp, _("    inlined from %qD"),
++		    pp_printf (pp, G_("    inlined from %qD"),
+ 			       fndecl);
+ 		}
+ 	    }
+@@ -3825,22 +3825,22 @@ function_category (tree fn)
+       && DECL_FUNCTION_MEMBER_P (fn))
+     {
+       if (DECL_STATIC_FUNCTION_P (fn))
+-	return _("In static member function %qD");
++	return G_("In static member function %qD");
+       else if (DECL_COPY_CONSTRUCTOR_P (fn))
+-	return _("In copy constructor %qD");
++	return G_("In copy constructor %qD");
+       else if (DECL_CONSTRUCTOR_P (fn))
+-	return _("In constructor %qD");
++	return G_("In constructor %qD");
+       else if (DECL_DESTRUCTOR_P (fn))
+-	return _("In destructor %qD");
++	return G_("In destructor %qD");
+       else if (LAMBDA_FUNCTION_P (fn))
+-	return _("In lambda function");
++	return G_("In lambda function");
+       else if (DECL_XOBJ_MEMBER_FUNCTION_P (fn))
+-	return _("In explicit object member function %qD");
++	return G_("In explicit object member function %qD");
+       else
+-	return _("In member function %qD");
++	return G_("In member function %qD");
+     }
+   else
+-    return _("In function %qD");
++    return G_("In function %qD");
+ }
+ 
+ /* Disable warnings about missing quoting in GCC diagnostics for
+@@ -3867,8 +3867,8 @@ print_instantiation_full_context (diagnostic_text_output_format &text_output)
+       char *indent = text_output.build_indent_prefix (true);
+       pp_verbatim (text_output.get_printer (),
+ 		   p->list_p ()
+-		   ? _("%s%s%sIn substitution of %qS:\n")
+-		   : _("%s%s%sIn instantiation of %q#D:\n"),
++		   ? G_("%s%s%sIn substitution of %qS:\n")
++		   : G_("%s%s%sIn instantiation of %q#D:\n"),
+ 		   indent,
+ 		   show_file ? LOCATION_FILE (location) : "",
+ 		   show_file ? ": " : "",
+@@ -3888,10 +3888,10 @@ print_location (diagnostic_text_output_format &text_output,
+   expanded_location xloc = expand_location (loc);
+   pretty_printer *const pp = text_output.get_printer ();
+   if (text_output.show_column_p ())
+-    pp_verbatim (pp, _("%r%s:%d:%d:%R   "),
++    pp_verbatim (pp, G_("%r%s:%d:%d:%R   "),
+ 		 "locus", xloc.file, xloc.line, xloc.column);
+   else
+-    pp_verbatim (pp, _("%r%s:%d:%R   "),
++    pp_verbatim (pp, G_("%r%s:%d:%R   "),
+ 		 "locus", xloc.file, xloc.line);
+ }
+ 
+@@ -3984,22 +3984,22 @@ print_instantiation_partial_context_line (diagnostic_text_output_format &text_ou
+       if (t->list_p ())
+ 	pp_verbatim (pp,
+ 		     recursive_p
+-		     ? _("recursively required by substitution of %qS\n")
+-		     : _("required by substitution of %qS\n"),
++		     ? G_("recursively required by substitution of %qS\n")
++		     : G_("required by substitution of %qS\n"),
+ 		     t->get_node ());
+       else
+ 	pp_verbatim (pp,
+ 		     recursive_p
+-		     ? _("recursively required from %q#D\n")
+-		     : _("required from %q#D\n"),
++		     ? G_("recursively required from %q#D\n")
++		     : G_("required from %q#D\n"),
+ 		     t->get_node ());
+     }
+   else
+     {
+       pp_verbatim (pp,
+ 		   recursive_p
+-		   ? _("recursively required from here\n")
+-		   : _("required from here\n"));
++		   ? G_("recursively required from here\n")
++		   : G_("required from here\n"));
+     }
+ }
+ 
+@@ -4049,8 +4049,8 @@ print_instantiation_partial_context (diagnostic_text_output_format &text_output,
+ 	{
+ 	  auto_context_line sentinel (text_output, loc);
+ 	  pp_verbatim (text_output.get_printer (),
+-		       _("[ skipping %d instantiation contexts,"
+-			 " use -ftemplate-backtrace-limit=0 to disable ]\n"),
++		       G_("[ skipping %d instantiation contexts,"
++			  " use -ftemplate-backtrace-limit=0 to disable ]\n"),
+ 		       skip);
+ 	  do {
+ 	    loc = t->locus;
+@@ -4101,7 +4101,7 @@ maybe_print_constexpr_context (diagnostic_text_output_format &text_output)
+       pretty_printer *const pp = text_output.get_printer ();
+       auto_context_line sentinel (text_output, EXPR_LOCATION (t));
+       pp_verbatim (pp,
+-		   _("in %<constexpr%> expansion of %qs"),
++		   G_("in %<constexpr%> expansion of %qs"),
+ 		   s);
+       pp_newline (pp);
+     }
+@@ -4114,7 +4114,7 @@ print_constrained_decl_info (diagnostic_text_output_format &text_output,
+ {
+   auto_context_line sentinel (text_output, DECL_SOURCE_LOCATION (decl));
+   pretty_printer *const pp = text_output.get_printer ();
+-  pp_verbatim (pp, "required by the constraints of %q#D\n", decl);
++  pp_verbatim (pp, G_("required by the constraints of %q#D\n"), decl);
+ }
+ 
+ static void
+@@ -4129,7 +4129,7 @@ print_concept_check_info (diagnostic_text_output_format &text_output,
+ 
+   cxx_pretty_printer *const pp
+     = (cxx_pretty_printer *)text_output.get_printer ();
+-  pp_verbatim (pp, "required for the satisfaction of %qE", expr);
++  pp_verbatim (pp, G_("required for the satisfaction of %qE"), expr);
+   if (map && map != error_mark_node)
+     {
+       tree subst_map = tsubst_parameter_mapping (map, args, tf_none, NULL_TREE);
+@@ -4151,7 +4151,7 @@ print_constraint_context_head (diagnostic_text_output_format &text_output,
+     {
+       auto_context_line sentinel (text_output, input_location);
+       pretty_printer *const pp = text_output.get_printer ();
+-      pp_verbatim (pp, "required for constraint satisfaction\n");
++      pp_verbatim (pp, G_("required for constraint satisfaction\n"));
+       return NULL_TREE;
+     }
+   if (DECL_P (src))
+@@ -4180,11 +4180,10 @@ print_requires_expression_info (diagnostic_text_output_format &text_output,
+   auto_context_line sentinel (text_output, cp_expr_loc_or_input_loc (expr));
+   cxx_pretty_printer *const pp
+     = static_cast <cxx_pretty_printer *> (text_output.get_printer ());
+-  pp_verbatim (pp, "in requirements ");
+ 
+   tree parms = TREE_OPERAND (expr, 0);
+-  if (parms)
+-    pp_verbatim (pp, "with ");
++  pp_verbatim (pp, parms ? G_("in requirements with ")
++			 : G_("in requirements "));
+   while (parms)
+     {
+       pp_verbatim (pp, "%q#D", parms);
+-- 
+2.43.5

diff --git a/sys-devel/gcc/files/gcc-15.0.1_pre20250406-qt.patch b/sys-devel/gcc/files/gcc-15.0.1_pre20250406-qt.patch
new file mode 100644
index 000000000000..86874faf6fdf
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-15.0.1_pre20250406-qt.patch
@@ -0,0 +1,77 @@
+https://inbox.sourceware.org/gcc-patches/20250409151104.2600656-1-ppalka@redhat.com/
+
+From 660e4bf9391692acb0bb18ba5eb38e689ae0a8a6 Mon Sep 17 00:00:00 2001
+Message-ID: <660e4bf9391692acb0bb18ba5eb38e689ae0a8a6.1744212391.git.sam@gentoo.org>
+From: Patrick Palka <ppalka@redhat.com>
+Date: Wed, 9 Apr 2025 11:11:04 -0400
+Subject: [PATCH] c++: alias_ctad_tweaks ICE w/ inherited CTAD [PR119687]
+
+With inherited CTAD the set of guides may be a two-dimensional overload
+set (i.e. OVERLOADs containing OVERLOADs) so alias_ctad_tweaks (which
+also handles the inherited CTAD transformation) needs to use the 2D-aware
+lkp_iterator instead of ovl_iterator.  Actually, we might as well use
+the more idiomatic lkp_range here.
+
+	PR c++/119687
+
+gcc/cp/ChangeLog:
+
+	* pt.cc (alias_ctad_tweaks): Use lkp_range / lkp_iterator
+	instead of ovl_iterator.
+
+gcc/testsuite/ChangeLog:
+
+* g++.dg/cpp23/class-deduction-inherited8.C: New test.
+---
+ gcc/cp/pt.cc                                  |  3 +--
+ .../g++.dg/cpp23/class-deduction-inherited8.C | 21 +++++++++++++++++++
+ 2 files changed, 22 insertions(+), 2 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp23/class-deduction-inherited8.C
+
+diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
+index 0e120c4040ed..352a7f4ed316 100644
+--- a/gcc/cp/pt.cc
++++ b/gcc/cp/pt.cc
+@@ -30937,9 +30937,8 @@ alias_ctad_tweaks (tree tmpl, tree uguides)
+   tree aguides = NULL_TREE;
+   tree atparms = INNERMOST_TEMPLATE_PARMS (fullatparms);
+   unsigned natparms = TREE_VEC_LENGTH (atparms);
+-  for (ovl_iterator iter (uguides); iter; ++iter)
++  for (tree f : lkp_range (uguides))
+     {
+-      tree f = *iter;
+       tree in_decl = f;
+       location_t loc = DECL_SOURCE_LOCATION (f);
+       tree ret = TREE_TYPE (TREE_TYPE (f));
+diff --git a/gcc/testsuite/g++.dg/cpp23/class-deduction-inherited8.C b/gcc/testsuite/g++.dg/cpp23/class-deduction-inherited8.C
+new file mode 100644
+index 000000000000..79fceadd9e1c
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp23/class-deduction-inherited8.C
+@@ -0,0 +1,21 @@
++// PR c++/119687
++// { dg-do compile { target c++20 } }
++
++template <typename> class QFlagsStorage{};
++
++template <typename Enum> struct QFlagsStorageHelper : QFlagsStorage<Enum>  {
++  using QFlagsStorage<Enum>::QFlagsStorage;
++
++public:
++  QFlagsStorageHelper(Enum);
++};
++
++template <typename Enum> struct QFlags : public QFlagsStorageHelper<Enum> {
++  using Base = QFlagsStorageHelper<Enum>;
++  using Base::Base;
++  QFlags(Enum);
++};
++
++void f(int flag) {
++  QFlags{int{}};
++}
+
+base-commit: 334545194d9023fb9b2f72ee0dcde8af94930f25
+-- 
+2.49.0
+

diff --git a/sys-devel/gcc/gcc-15.0.1_pre20250406-r1.ebuild b/sys-devel/gcc/gcc-15.0.1_pre20250406-r2.ebuild
similarity index 95%
rename from sys-devel/gcc/gcc-15.0.1_pre20250406-r1.ebuild
rename to sys-devel/gcc/gcc-15.0.1_pre20250406-r2.ebuild
index a27cfb06a0df..db6335cc3065 100644
--- a/sys-devel/gcc/gcc-15.0.1_pre20250406-r1.ebuild
+++ b/sys-devel/gcc/gcc-15.0.1_pre20250406-r2.ebuild
@@ -53,5 +53,7 @@ src_prepare() {
 	toolchain_src_prepare
 	eapply "${FILESDIR}"/${P}-simplify-oops.patch
 	eapply "${FILESDIR}"/${P}-compare-debug.patch
+	eapply "${FILESDIR}"/${P}-de-locale.patch
+	eapply "${FILESDIR}"/${P}-qt.patch
 	eapply_user
 }


             reply	other threads:[~2025-04-10 17:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 17:50 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-25 16:32 [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/files/, sys-devel/gcc/ Sam James
2025-04-21  6:22 Sam James
2025-04-07  4:05 Sam James
2025-04-01 22:43 Sam James
2025-03-27 14:43 Sam James
2025-03-26 12:39 Sam James
2025-03-03 19:40 Sam James
2025-02-23  5:42 Sam James
2025-02-15  4:01 Sam James
2024-12-27 18:01 Sam James
2024-09-24  1:41 Sam James
2024-09-23 15:23 Sam James
2024-05-08 14:56 Sam James
2024-03-26 20:09 Sam James
2024-03-04 23:34 Sam James
2023-10-24  1:59 Sam James
2023-10-03 19:03 Sam James
2023-03-29  1:51 Sam James
2022-08-22  1:41 Sam James
2019-05-29 19:22 Andreas K. Hüttel
2019-05-01 17:14 Sergei Trofimovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1744307421.3ca9bf82275c086395e6947a5a2e9f1cc28134f1.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox