public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fortran : Fortran translation issues PR52279
@ 2020-06-25  6:28 Mark Eggleston
  2020-06-30 12:59 ` Mark Eggleston
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Eggleston @ 2020-06-25  6:28 UTC (permalink / raw)
  To: gcc-patches, fortran

[-- Attachment #1: Type: text/plain, Size: 2905 bytes --]

Patch to fix PR52279.  Marked strings that are indirectly used in error 
and warning messages so that they are marked for translation.

OK to commit?

Commit message:

Fortran  : Fortran translation issues PR52279

Mark strings for translation by enclosing in G_() and _().

2020-06-24  Mark Eggleston <markeggleston@gcc.gnu.org>

gcc/fortran/

     PR fortran/52279
     * arith.c (reduce_binary_aa): Mark for translation the string
     parameter to gfc_check_conformance with G_().
     * check.c (gfc_invalid_boz): Mark hint for translation using
     _().  (gfc_check_achar): Mark for translation the message
     parameter to gfc_invalid_boz using G_(). (gfc_check_char):
     Mark for translation the message parameter to gfc_invalid_boz
     using G_().  (gfc_check_complex): Mark for translation the
     message parameter to gfc_invalid_boz using G_().
     (gfc_check_float): Mark for translation the message
         parameter to gfc_invalid_boz using G_(). (check_rest): Mark
     for translation the string parameter to gfc_check_conformance
     with _().  (gfc_check_minloc_maxloc): Mark for translation
     the string parameter to gfc_check_conformance with _().
     (gfc_check_findloc): Mark for translation the string parameter
     to gfc_check_conformance with _(). (check_reduction): Mark
         for translation the string parameter to gfc_check_conformance
         with _().  (gfc_check_pack): Mark for translation the string
     parameter to gfc_check_conformance with _().
     * decl.c (match_old_style_init): Mark for translation the
     message parameter to gfc_invalid_boz using G_().
     * decl.c (gfc_check_assign): Mark for translation the string
     parameter to gfc_check_conformance with _().
     * intrinsic.c (check_specific): Mark for translation the string
     parameter to gfc_check_conformance with _().
     (gfc_check_intrinsic_standard): Mark symstd_msg strings for
     translation using G_(). No need to mark symstd_msg for
     translation in call to gfc_warning or when setting symstd.
     * io.c (check_open_constraints):  Mark strings for translation
     using G_() in all calls to warn_or_error. (match_io_element):
     Mark for translation the message parameter to gfc_invalid_boz
         using G_().
     * primary.c (match_boz_constant): Mark for translation the
     message parameter to gfc_invalid_boz using G_().
     * resolve.c (resolve_elemental_actual):  Mark for translation
     the string parameter to gfc_check_conformance with _().
     (resolve_operator):  Mark for translation the string parameter
     to gfc_check_conformance with _().  Mark translation strings
     assigned to msg using G_() for use in a call to cfg_warning.

-- 
https://www.codethink.co.uk/privacy.html


[-- Attachment #2: 0001-Fortran-Fortran-translation-issues-PR52279.patch --]
[-- Type: text/x-patch, Size: 18171 bytes --]

From ecd9fd13dcc6479b14072e6a0c8b186d33e5992b Mon Sep 17 00:00:00 2001
From: Mark Eggleston <markeggleston@gcc.gnu.org>
Date: Tue, 2 Jun 2020 08:38:01 +0100
Subject: [PATCH] Fortran  : Fortran translation issues PR52279

Mark strings for translation by enclosing in G_() and _().

2020-06-24  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/fortran/

	PR fortran/52279
	* arith.c (reduce_binary_aa): Mark for translation the string
	parameter to gfc_check_conformance with G_().
	* check.c (gfc_invalid_boz): Mark hint for translation using
	_().  (gfc_check_achar): Mark for translation the message
	parameter to gfc_invalid_boz using G_().  (gfc_check_char):
	Mark for translation the message parameter to gfc_invalid_boz
	using G_().  (gfc_check_complex): Mark for translation the
	message parameter to gfc_invalid_boz using G_().
	(gfc_check_float): Mark for translation the message
        parameter to gfc_invalid_boz using G_().  (check_rest): Mark
	for translation the string parameter to gfc_check_conformance
	with _().  (gfc_check_minloc_maxloc): Mark for translation
	the string parameter to gfc_check_conformance with _().
	(gfc_check_findloc): Mark for translation the string parameter
	to gfc_check_conformance with _().  (check_reduction): Mark
        for translation the string parameter to gfc_check_conformance
        with _().  (gfc_check_pack): Mark for translation the string
	parameter to gfc_check_conformance with _().
	* decl.c (match_old_style_init): Mark for translation the
	message parameter to gfc_invalid_boz using G_().
	* decl.c (gfc_check_assign): Mark for translation the string
	parameter to gfc_check_conformance with _().
	* intrinsic.c (check_specific): Mark for translation the string
	parameter to gfc_check_conformance with _().
	(gfc_check_intrinsic_standard): Mark symstd_msg strings for
	translation using G_(). No need to mark symstd_msg for
	translation in call to gfc_warning or when setting symstd.
	* io.c (check_open_constraints):  Mark strings for translation
	using G_() in all calls to warn_or_error.  (match_io_element):
	Mark for translation the message parameter to gfc_invalid_boz
        using G_().
	* primary.c (match_boz_constant): Mark for translation the
	message parameter to gfc_invalid_boz using G_().
	* resolve.c (resolve_elemental_actual):  Mark for translation
	the string parameter to gfc_check_conformance with _().
	(resolve_operator):  Mark for translation the string parameter
	to gfc_check_conformance with _().  Mark translation strings
	assigned to msg using G_() for use in a call to cfg_warning.
---
 gcc/fortran/arith.c     |  2 +-
 gcc/fortran/check.c     | 34 +++++++++++++++++-----------------
 gcc/fortran/decl.c      |  8 ++++----
 gcc/fortran/expr.c      |  2 +-
 gcc/fortran/intrinsic.c | 28 ++++++++++++++--------------
 gcc/fortran/io.c        | 26 +++++++++++++-------------
 gcc/fortran/primary.c   |  8 ++++----
 gcc/fortran/resolve.c   | 16 ++++++++--------
 8 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index f76e19640a3..c4c1041afdf 100644
--- a/gcc/fortran/arith.c
+++ b/gcc/fortran/arith.c
@@ -1387,7 +1387,7 @@ reduce_binary_aa (arith (*eval) (gfc_expr *, gfc_expr *, gfc_expr **),
   gfc_expr *r;
   arith rc = ARITH_OK;
 
-  if (!gfc_check_conformance (op1, op2, "elemental binary operation"))
+  if (!gfc_check_conformance (op1, op2, _("elemental binary operation")))
     return ARITH_INCOMMENSURATE;
 
   head = gfc_constructor_copy (op1->value.constructor);
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index de9a45fe4f9..d0ec3796f7b 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -67,7 +67,7 @@ gfc_invalid_boz (const char *msg, locus *loc)
       return false;
     }
 
-  const char hint[] = " [see %<-fno-allow-invalid-boz%>]";
+  const char hint[] = _(" [see %<-fno-allow-invalid-boz%>]");
   size_t len = strlen (msg) + strlen (hint) + 1;
   char *msg2 = (char *) alloca (len);
   strcpy (msg2, msg);
@@ -1313,8 +1313,8 @@ gfc_check_achar (gfc_expr *a, gfc_expr *kind)
 {
   if (a->ts.type == BT_BOZ)
     {
-      if (gfc_invalid_boz ("BOZ literal constant at %L cannot appear in "
-			   "ACHAR intrinsic subprogram", &a->where))
+      if (gfc_invalid_boz (G_("BOZ literal constant at %L cannot appear in "
+			   "ACHAR intrinsic subprogram"), &a->where))
 	return false;
 
       if (!gfc_boz2int (a, gfc_default_integer_kind))
@@ -1973,8 +1973,8 @@ gfc_check_char (gfc_expr *i, gfc_expr *kind)
 {
   if (i->ts.type == BT_BOZ)
     {
-      if (gfc_invalid_boz ("BOZ literal constant at %L cannot appear in "
-			   "CHAR intrinsic subprogram", &i->where))
+      if (gfc_invalid_boz (G_("BOZ literal constant at %L cannot appear in "
+			   "CHAR intrinsic subprogram"), &i->where))
 	return false;
 
       if (!gfc_boz2int (i, gfc_default_integer_kind))
@@ -2424,8 +2424,8 @@ gfc_check_complex (gfc_expr *x, gfc_expr *y)
 
   if (x->ts.type == BT_BOZ)
     {
-      if (gfc_invalid_boz ("BOZ constant at %L cannot appear in the COMPLEX "
-			   "intrinsic subprogram", &x->where))
+      if (gfc_invalid_boz (G_("BOZ constant at %L cannot appear in the COMPLEX"
+			   " intrinsic subprogram"), &x->where))
 	{
 	  reset_boz (x);
 	  return false;
@@ -2438,8 +2438,8 @@ gfc_check_complex (gfc_expr *x, gfc_expr *y)
 
   if (y->ts.type == BT_BOZ)
     {
-      if (gfc_invalid_boz ("BOZ constant at %L cannot appear in the COMPLEX "
-			   "intrinsic subprogram", &y->where))
+      if (gfc_invalid_boz (G_("BOZ constant at %L cannot appear in the COMPLEX"
+			   " intrinsic subprogram"), &y->where))
 	{
 	  reset_boz (y);
 	  return false;
@@ -2903,8 +2903,8 @@ gfc_check_float (gfc_expr *a)
 {
   if (a->ts.type == BT_BOZ)
     {
-      if (gfc_invalid_boz ("BOZ literal constant at %L cannot appear in the "
-			   "FLOAT intrinsic subprogram", &a->where))
+      if (gfc_invalid_boz (G_("BOZ literal constant at %L cannot appear in the"
+			   " FLOAT intrinsic subprogram"), &a->where))
 	{
 	  reset_boz (a);
 	  return false;
@@ -3706,8 +3706,8 @@ check_rest (bt type, int kind, gfc_actual_arglist *arglist)
 
       for (tmp = arglist, m=1; tmp != arg; tmp = tmp->next, m++)
 	if (!gfc_check_conformance (tmp->expr, x,
-				    "arguments 'a%d' and 'a%d' for "
-				    "intrinsic '%s'", m, n,
+				    _("arguments 'a%d' and 'a%d' for "
+				    "intrinsic '%s'"), m, n,
 				    gfc_current_intrinsic))
 	    return false;
     }
@@ -3914,7 +3914,7 @@ gfc_check_minloc_maxloc (gfc_actual_arglist *ap)
 
   if (m != NULL
       && !gfc_check_conformance (a, m,
-				 "arguments '%s' and '%s' for intrinsic %s",
+				 _("arguments '%s' and '%s' for intrinsic %s"),
 				 gfc_current_intrinsic_arg[0]->name,
 				 gfc_current_intrinsic_arg[2]->name,
 				 gfc_current_intrinsic))
@@ -3995,7 +3995,7 @@ gfc_check_findloc (gfc_actual_arglist *ap)
 
   if (m != NULL
       && !gfc_check_conformance (a, m,
-				 "arguments '%s' and '%s' for intrinsic %s",
+				 _("arguments '%s' and '%s' for intrinsic %s"),
 				 gfc_current_intrinsic_arg[0]->name,
 				 gfc_current_intrinsic_arg[3]->name,
 				 gfc_current_intrinsic))
@@ -4060,7 +4060,7 @@ check_reduction (gfc_actual_arglist *ap)
 
   if (m != NULL
       && !gfc_check_conformance (a, m,
-				 "arguments '%s' and '%s' for intrinsic %s",
+				 _("arguments '%s' and '%s' for intrinsic %s"),
 				 gfc_current_intrinsic_arg[0]->name,
 				 gfc_current_intrinsic_arg[2]->name,
 				 gfc_current_intrinsic))
@@ -4398,7 +4398,7 @@ gfc_check_pack (gfc_expr *array, gfc_expr *mask, gfc_expr *vector)
     return false;
 
   if (!gfc_check_conformance (array, mask,
-			      "arguments '%s' and '%s' for intrinsic '%s'",
+			      _("arguments '%s' and '%s' for intrinsic '%s'"),
 			      gfc_current_intrinsic_arg[0]->name,
 			      gfc_current_intrinsic_arg[1]->name,
 			      gfc_current_intrinsic))
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index c27cfacf2e4..bb0d078dac4 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -576,16 +576,16 @@ match_old_style_init (const char *name)
   for (nd = newdata; nd; nd = nd->next)
     {
       if (nd->value->expr->ts.type == BT_BOZ
-	  && gfc_invalid_boz ("BOZ at %L cannot appear in an old-style "
-			      "initialization", &nd->value->expr->where))
+	  && gfc_invalid_boz (G_("BOZ at %L cannot appear in an old-style "
+			      "initialization"), &nd->value->expr->where))
 	return MATCH_ERROR;
 
       if (nd->var->expr->ts.type != BT_INTEGER
 	  && nd->var->expr->ts.type != BT_REAL
 	  && nd->value->expr->ts.type == BT_BOZ)
 	{
-	  gfc_error ("BOZ literal constant near %L cannot be assigned to "
-		     "a %qs variable in an old-style initialization",
+	  gfc_error (G_("BOZ literal constant near %L cannot be assigned to "
+		     "a %qs variable in an old-style initialization"),
 		     &nd->value->expr->where,
 		     gfc_typename (&nd->value->expr->ts));
 	  return MATCH_ERROR;
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 8daa7bb8d06..5bef65df862 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -3693,7 +3693,7 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform,
 
   /* Check size of array assignments.  */
   if (lvalue->rank != 0 && rvalue->rank != 0
-      && !gfc_check_conformance (lvalue, rvalue, "array assignment"))
+      && !gfc_check_conformance (lvalue, rvalue, _("array assignment")))
     return false;
 
   /* Handle the case of a BOZ literal on the RHS.  */
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index 30f9f14572b..3518a4e2c87 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -4775,8 +4775,8 @@ check_specific (gfc_intrinsic_sym *specific, gfc_expr *expr, int error_flag)
 
       for ( ; arg && arg->expr; arg = arg->next, n++)
 	if (!gfc_check_conformance (first_expr, arg->expr,
-				    "arguments '%s' and '%s' for "
-				    "intrinsic '%s'",
+				    _("arguments '%s' and '%s' for "
+				    "intrinsic '%s'"),
 				    gfc_current_intrinsic_arg[0]->name,
 				    gfc_current_intrinsic_arg[n]->name,
 				    gfc_current_intrinsic))
@@ -4812,39 +4812,39 @@ gfc_check_intrinsic_standard (const gfc_intrinsic_sym* isym,
   switch (isym->standard)
     {
     case GFC_STD_F77:
-      symstd_msg = "available since Fortran 77";
+      symstd_msg = _("available since Fortran 77");
       break;
 
     case GFC_STD_F95_OBS:
-      symstd_msg = "obsolescent in Fortran 95";
+      symstd_msg = _("obsolescent in Fortran 95");
       break;
 
     case GFC_STD_F95_DEL:
-      symstd_msg = "deleted in Fortran 95";
+      symstd_msg = _("deleted in Fortran 95");
       break;
 
     case GFC_STD_F95:
-      symstd_msg = "new in Fortran 95";
+      symstd_msg = _("new in Fortran 95");
       break;
 
     case GFC_STD_F2003:
-      symstd_msg = "new in Fortran 2003";
+      symstd_msg = _("new in Fortran 2003");
       break;
 
     case GFC_STD_F2008:
-      symstd_msg = "new in Fortran 2008";
+      symstd_msg = _("new in Fortran 2008");
       break;
 
     case GFC_STD_F2018:
-      symstd_msg = "new in Fortran 2018";
+      symstd_msg = _("new in Fortran 2018");
       break;
 
     case GFC_STD_GNU:
-      symstd_msg = "a GNU Fortran extension";
+      symstd_msg = _("a GNU Fortran extension");
       break;
 
     case GFC_STD_LEGACY:
-      symstd_msg = "for backward compatibility";
+      symstd_msg = _("for backward compatibility");
       break;
 
     default:
@@ -4857,8 +4857,8 @@ gfc_check_intrinsic_standard (const gfc_intrinsic_sym* isym,
     {
       /* Do only print a warning if not a GNU extension.  */
       if (!silent && isym->standard != GFC_STD_GNU)
-	gfc_warning (0, "Intrinsic %qs (is %s) is used at %L",
-		     isym->name, _(symstd_msg), &where);
+	gfc_warning (0, "Intrinsic %qs (%s) used at %L",
+		     isym->name, symstd_msg, &where);
 
       return true;
     }
@@ -4869,7 +4869,7 @@ gfc_check_intrinsic_standard (const gfc_intrinsic_sym* isym,
 
   /* Otherwise, fail.  */
   if (symstd)
-    *symstd = _(symstd_msg);
+    *symstd = symstd_msg;
   return false;
 }
 
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 981cf9e88dd..b350cd9389c 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -2406,7 +2406,7 @@ check_open_constraints (gfc_open *open, locus *where)
       && open->recl->ts.type == BT_INTEGER
       && mpz_sgn (open->recl->value.integer) != 1)
     {
-      warn_or_error ("RECL in OPEN statement at %L must be positive",
+      warn_or_error (G_("RECL in OPEN statement at %L must be positive"),
 		     &open->recl->where);
     }
 
@@ -2431,8 +2431,8 @@ check_open_constraints (gfc_open *open, locus *where)
 	{
 	  char *s = gfc_widechar_to_char (open->status->value.character.string,
 					  -1);
-	  warn_or_error ("The STATUS specified in OPEN statement at %L is "
-			 "%qs and no FILE specifier is present",
+	  warn_or_error (G_("The STATUS specified in OPEN statement at %L is "
+			 "%qs and no FILE specifier is present"),
 			 &open->status->where, s);
 	  free (s);
 	}
@@ -2442,9 +2442,9 @@ check_open_constraints (gfc_open *open, locus *where)
       if (gfc_wide_strncasecmp (open->status->value.character.string,
 				"scratch", 7) == 0 && open->file)
 	{
-	  warn_or_error ("The STATUS specified in OPEN statement at %L "
+	  warn_or_error (G_("The STATUS specified in OPEN statement at %L "
 			 "cannot have the value SCRATCH if a FILE specifier "
-			 "is present", &open->status->where);
+			 "is present"), &open->status->where);
 	}
     }
 
@@ -2506,16 +2506,16 @@ check_open_constraints (gfc_open *open, locus *where)
 	  spec = "";
 	}
 
-      warn_or_error ("%s specifier at %L not allowed in OPEN statement for "
-		     "unformatted I/O", spec, loc);
+      warn_or_error (G_("%s specifier at %L not allowed in OPEN statement for "
+		     "unformatted I/O"), spec, loc);
     }
 
   if (open->recl && open->access && open->access->expr_type == EXPR_CONSTANT
       && gfc_wide_strncasecmp (open->access->value.character.string,
 			       "stream", 6) == 0)
     {
-      warn_or_error ("RECL specifier not allowed in OPEN statement at %L for "
-		     "stream I/O", &open->recl->where);
+      warn_or_error (G_("RECL specifier not allowed in OPEN statement at %L for "
+		     "stream I/O"), &open->recl->where);
     }
 
   if (open->position
@@ -2527,8 +2527,8 @@ check_open_constraints (gfc_open *open, locus *where)
 	   || gfc_wide_strncasecmp (open->access->value.character.string,
 				    "append", 6) == 0))
     {
-      warn_or_error ("POSITION specifier in OPEN statement at %L only allowed "
-		     "for stream or sequential ACCESS", &open->position->where);
+      warn_or_error (G_("POSITION specifier in OPEN statement at %L only allowed "
+		     "for stream or sequential ACCESS"), &open->position->where);
     }
 
   return true;
@@ -3665,8 +3665,8 @@ match_io_element (io_kind k, gfc_code **cpp)
 
       if (m == MATCH_YES && expr->ts.type == BT_BOZ)
 	{
-	  if (gfc_invalid_boz ("BOZ literal constant at %L cannot appear in "
-				"an output IO list", &gfc_current_locus))
+	  if (gfc_invalid_boz (G_("BOZ literal constant at %L cannot appear in"
+				" an output IO list"), &gfc_current_locus))
 	    return MATCH_ERROR;
 	  if (!gfc_boz2int (expr, gfc_max_integer_kind))
 	    return MATCH_ERROR;
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index 7c221c8d209..76b1607ee3d 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -432,8 +432,8 @@ match_boz_constant (gfc_expr **result)
     goto backup;
 
   if (x_hex
-      && gfc_invalid_boz ("Hexadecimal constant at %L uses "
-			  "nonstandard X instead of Z", &gfc_current_locus))
+      && gfc_invalid_boz (G_("Hexadecimal constant at %L uses "
+			  "nonstandard X instead of Z"), &gfc_current_locus))
     return MATCH_ERROR;
 
   old_loc = gfc_current_locus;
@@ -470,8 +470,8 @@ match_boz_constant (gfc_expr **result)
 	  goto backup;
 	}
 
-      if (gfc_invalid_boz ("BOZ constant at %C uses nonstandard postfix "
-			   "syntax", &gfc_current_locus))
+      if (gfc_invalid_boz (G_("BOZ constant at %C uses nonstandard postfix "
+			   "syntax"), &gfc_current_locus))
 	return MATCH_ERROR;
     }
 
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index c53b312f7ed..5e44781f3ce 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -2299,7 +2299,7 @@ resolve_elemental_actual (gfc_expr *expr, gfc_code *c)
       /* Elemental procedure's array actual arguments must conform.  */
       if (e != NULL)
 	{
-	  if (!gfc_check_conformance (arg->expr, e, "elemental procedure"))
+	  if (!gfc_check_conformance (arg->expr, e, _("elemental procedure")))
 	    return false;
 	}
       else
@@ -4174,9 +4174,9 @@ resolve_operator (gfc_expr *e)
       /* If op1 is BOZ, then op2 is not!.  Try to convert to type of op2.  */
       if (op1->ts.type == BT_BOZ)
 	{
-	  if (gfc_invalid_boz ("BOZ literal constant near %L cannot appear as "
-				"an operand of a relational operator",
-				&op1->where))
+	  if (gfc_invalid_boz (G_("BOZ literal constant near %L cannot appear "
+			       "as an operand of a relational operator"),
+			       &op1->where))
 	    return false;
 
 	  if (op2->ts.type == BT_INTEGER && !gfc_boz2int (op1, op2->ts.kind))
@@ -4189,8 +4189,8 @@ resolve_operator (gfc_expr *e)
       /* If op2 is BOZ, then op1 is not!.  Try to convert to type of op2. */
       if (op2->ts.type == BT_BOZ)
 	{
-	  if (gfc_invalid_boz ("BOZ literal constant near %L cannot appear as "
-				"an operand of a relational operator",
+	  if (gfc_invalid_boz (G_("BOZ literal constant near %L cannot appear"
+			       " as an operand of a relational operator"),
 				&op2->where))
 	    return false;
 
@@ -4228,9 +4228,9 @@ resolve_operator (gfc_expr *e)
 		  const char *msg;
 
 		  if (op == INTRINSIC_EQ || op == INTRINSIC_EQ_OS)
-		    msg = "Equality comparison for %s at %L";
+		    msg = G_("Equality comparison for %s at %L");
 		  else
-		    msg = "Inequality comparison for %s at %L";
+		    msg = G_("Inequality comparison for %s at %L");
 
 		  gfc_warning (OPT_Wcompare_reals, msg,
 			       gfc_typename (op1), &op1->where);
-- 
2.11.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-06-25  6:28 Fortran : Fortran translation issues PR52279 Mark Eggleston
@ 2020-06-30 12:59 ` Mark Eggleston
  2020-06-30 13:11   ` Thomas Koenig
  2020-07-01 17:56   ` Martin Sebor
  0 siblings, 2 replies; 14+ messages in thread
From: Mark Eggleston @ 2020-06-30 12:59 UTC (permalink / raw)
  To: gcc-patches, fortran

ping!

On 25/06/2020 07:28, Mark Eggleston wrote:
> Patch to fix PR52279.  Marked strings that are indirectly used in 
> error and warning messages so that they are marked for translation.
>
> OK to commit?
>
> Commit message:
>
> Fortran  : Fortran translation issues PR52279
>
> Mark strings for translation by enclosing in G_() and _().
>
> 2020-06-24  Mark Eggleston <markeggleston@gcc.gnu.org>
>
> gcc/fortran/
>
>     PR fortran/52279
>     * arith.c (reduce_binary_aa): Mark for translation the string
>     parameter to gfc_check_conformance with G_().
>     * check.c (gfc_invalid_boz): Mark hint for translation using
>     _().  (gfc_check_achar): Mark for translation the message
>     parameter to gfc_invalid_boz using G_(). (gfc_check_char):
>     Mark for translation the message parameter to gfc_invalid_boz
>     using G_().  (gfc_check_complex): Mark for translation the
>     message parameter to gfc_invalid_boz using G_().
>     (gfc_check_float): Mark for translation the message
>         parameter to gfc_invalid_boz using G_(). (check_rest): Mark
>     for translation the string parameter to gfc_check_conformance
>     with _().  (gfc_check_minloc_maxloc): Mark for translation
>     the string parameter to gfc_check_conformance with _().
>     (gfc_check_findloc): Mark for translation the string parameter
>     to gfc_check_conformance with _(). (check_reduction): Mark
>         for translation the string parameter to gfc_check_conformance
>         with _().  (gfc_check_pack): Mark for translation the string
>     parameter to gfc_check_conformance with _().
>     * decl.c (match_old_style_init): Mark for translation the
>     message parameter to gfc_invalid_boz using G_().
>     * decl.c (gfc_check_assign): Mark for translation the string
>     parameter to gfc_check_conformance with _().
>     * intrinsic.c (check_specific): Mark for translation the string
>     parameter to gfc_check_conformance with _().
>     (gfc_check_intrinsic_standard): Mark symstd_msg strings for
>     translation using G_(). No need to mark symstd_msg for
>     translation in call to gfc_warning or when setting symstd.
>     * io.c (check_open_constraints):  Mark strings for translation
>     using G_() in all calls to warn_or_error. (match_io_element):
>     Mark for translation the message parameter to gfc_invalid_boz
>         using G_().
>     * primary.c (match_boz_constant): Mark for translation the
>     message parameter to gfc_invalid_boz using G_().
>     * resolve.c (resolve_elemental_actual):  Mark for translation
>     the string parameter to gfc_check_conformance with _().
>     (resolve_operator):  Mark for translation the string parameter
>     to gfc_check_conformance with _().  Mark translation strings
>     assigned to msg using G_() for use in a call to cfg_warning.
>
-- 
https://www.codethink.co.uk/privacy.html


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-06-30 12:59 ` Mark Eggleston
@ 2020-06-30 13:11   ` Thomas Koenig
  2020-07-01 17:56   ` Martin Sebor
  1 sibling, 0 replies; 14+ messages in thread
From: Thomas Koenig @ 2020-06-30 13:11 UTC (permalink / raw)
  To: Mark Eggleston, gcc-patches, fortran

Hi Mark,

that one is OK for master.  Thanks!

Regards

	Thomas


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-06-30 12:59 ` Mark Eggleston
  2020-06-30 13:11   ` Thomas Koenig
@ 2020-07-01 17:56   ` Martin Sebor
  1 sibling, 0 replies; 14+ messages in thread
From: Martin Sebor @ 2020-07-01 17:56 UTC (permalink / raw)
  To: Mark Eggleston, gcc-patches, fortran

Hi Mark,

I suspect this change may be behind a bootstrap failure I'm seeing.
My guess is that the hint needs to be a pointer rather than an array.

Thanks
Martin

In file included from /ssd/test/src/gcc/trunk/gcc/fortran/gfortran.h:52,
                  from /ssd/test/src/gcc/trunk/gcc/fortran/check.c:32:
/ssd/test/src/gcc/trunk/gcc/fortran/check.c: In function ‘bool 
gfc_invalid_boz(const char*, locus*)’:
/ssd/test/src/gcc/trunk/gcc/intl.h:51:27: error: initializer fails to 
determine size of ‘hint’
    51 | # define _(msgid) gettext (msgid)
       |                   ~~~~~~~~^~~~~~~
/ssd/test/src/gcc/trunk/gcc/fortran/check.c:70:23: note: in expansion of 
macro ‘_’
    70 |   const char hint[] = _(" [see %<-fno-allow-invalid-boz%>]");
       |                       ^
/ssd/test/src/gcc/trunk/gcc/intl.h:51:27: error: array must be 
initialized with a brace-enclosed initializer
    51 | # define _(msgid) gettext (msgid)
       |                   ~~~~~~~~^~~~~~~
/ssd/test/src/gcc/trunk/gcc/fortran/check.c:70:23: note: in expansion of 
macro ‘_’
    70 |   const char hint[] = _(" [see %<-fno-allow-invalid-boz%>]");
       |                       ^


On 6/30/20 6:59 AM, Mark Eggleston wrote:
> ping!
> 
> On 25/06/2020 07:28, Mark Eggleston wrote:
>> Patch to fix PR52279.  Marked strings that are indirectly used in 
>> error and warning messages so that they are marked for translation.
>>
>> OK to commit?
>>
>> Commit message:
>>
>> Fortran  : Fortran translation issues PR52279
>>
>> Mark strings for translation by enclosing in G_() and _().
>>
>> 2020-06-24  Mark Eggleston <markeggleston@gcc.gnu.org>
>>
>> gcc/fortran/
>>
>>     PR fortran/52279
>>     * arith.c (reduce_binary_aa): Mark for translation the string
>>     parameter to gfc_check_conformance with G_().
>>     * check.c (gfc_invalid_boz): Mark hint for translation using
>>     _().  (gfc_check_achar): Mark for translation the message
>>     parameter to gfc_invalid_boz using G_(). (gfc_check_char):
>>     Mark for translation the message parameter to gfc_invalid_boz
>>     using G_().  (gfc_check_complex): Mark for translation the
>>     message parameter to gfc_invalid_boz using G_().
>>     (gfc_check_float): Mark for translation the message
>>         parameter to gfc_invalid_boz using G_(). (check_rest): Mark
>>     for translation the string parameter to gfc_check_conformance
>>     with _().  (gfc_check_minloc_maxloc): Mark for translation
>>     the string parameter to gfc_check_conformance with _().
>>     (gfc_check_findloc): Mark for translation the string parameter
>>     to gfc_check_conformance with _(). (check_reduction): Mark
>>         for translation the string parameter to gfc_check_conformance
>>         with _().  (gfc_check_pack): Mark for translation the string
>>     parameter to gfc_check_conformance with _().
>>     * decl.c (match_old_style_init): Mark for translation the
>>     message parameter to gfc_invalid_boz using G_().
>>     * decl.c (gfc_check_assign): Mark for translation the string
>>     parameter to gfc_check_conformance with _().
>>     * intrinsic.c (check_specific): Mark for translation the string
>>     parameter to gfc_check_conformance with _().
>>     (gfc_check_intrinsic_standard): Mark symstd_msg strings for
>>     translation using G_(). No need to mark symstd_msg for
>>     translation in call to gfc_warning or when setting symstd.
>>     * io.c (check_open_constraints):  Mark strings for translation
>>     using G_() in all calls to warn_or_error. (match_io_element):
>>     Mark for translation the message parameter to gfc_invalid_boz
>>         using G_().
>>     * primary.c (match_boz_constant): Mark for translation the
>>     message parameter to gfc_invalid_boz using G_().
>>     * resolve.c (resolve_elemental_actual):  Mark for translation
>>     the string parameter to gfc_check_conformance with _().
>>     (resolve_operator):  Mark for translation the string parameter
>>     to gfc_check_conformance with _().  Mark translation strings
>>     assigned to msg using G_() for use in a call to cfg_warning.
>>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-07-02 15:47           ` David Edelsohn
@ 2020-07-03 13:22             ` David Edelsohn
  0 siblings, 0 replies; 14+ messages in thread
From: David Edelsohn @ 2020-07-03 13:22 UTC (permalink / raw)
  To: Mark Eggleston; +Cc: GCC Patches, Fortran List, Martin Sebor

Mark,

A full bootstrap is successful with the translation markers restored
and declaring hint as "const char *".

const char *hint = _(" [see %<-fno-allow-invalid-boz%>]");

I assume that the translation system works correctly for that style.

Do you want to apply the patch or do you want me to?

Thanks, David

On Thu, Jul 2, 2020 at 11:47 AM David Edelsohn <dje.gcc@gmail.com> wrote:
>
> Mark,
>
> A quick test with
>
> const char hint [] = _(" [see %<-fno-allow-invalid-boz%>]");
>
> reproduces the failure.
>
> const char *hint = _(" [see %<-fno-allow-invalid-boz%>]");
>
> seems to work.  I will do a full bootstrap test with that change later today.
>
> Do you want me to commit it if it works or do you want me to report it to you?
>
> Thanks, David
>
> On Thu, Jul 2, 2020 at 9:38 AM David Edelsohn <dje.gcc@gmail.com> wrote:
> >
> > On Thu, Jul 2, 2020 at 8:56 AM Mark Eggleston
> > <mark.eggleston@codethink.co.uk> wrote:
> > >
> > > On 02/07/2020 13:25, David Edelsohn wrote:
> > > > On Thu, Jul 2, 2020 at 6:16 AM Mark Eggleston
> > > > <mark.eggleston@codethink.co.uk> wrote:
> > > >> I've committed the change from array to pointer. Does this fix your builds?
> > > >>
> > > >> On 02/07/2020 08:18, Mark Eggleston wrote:
> > > >>> On 01/07/2020 20:07, David Edelsohn wrote:
> > > >>>> This patch breaks bootstrap.
> > > >>> Apologies. I didn't see this when I built the compiler the with
> > > >>> bootstrap on x86_64. I'll endevour to get it fixed as soon as possible.
> > > > Mark,
> > > >
> > > > Your change did nothing because I previously had removed the
> > > > translation markers to restore bootstrap.  You were not sufficiently
> > > > observant to check the ChangeLog or notice that the line already was
> > > > changed.
> > > >
> > > > Please stop making random, untested changes.  This is inappropriate
> > > > for GCC development.
> > > OK. I had no way of confirming as the bootstrap worked for me. I naively
> > > thought that it was covered as an "obvious" fix.
> > >
> > > I was concerned that I caused a breakage and wanted to fix it.
> > >
> > > Regarding the ChangeLog I was unfamiliar with this situation and will
> > > check them if this ever happens again (I hope not).  I'll also keep
> > > portability issues in mind.
> > >
> > > I see the issue of the incorrect hint text has been addressed. As I
> > > understand it the string as is will not make it to the pot file so will
> > > not be translated, is that acceptable? I would like to be able to close
> > > the PR.
> >
> > Mark,
> >
> > I reverted your change for that one line to restore bootstrap for
> > everyone because Trunk should not be broken for 6 hours and it was
> > trivial to revert that one, localized change without affecting the
> > rest of your patch.
> >
> > The translation message for hint should be in the pot file
> > translation.  This needs to be fixed correctly.
> >
> > I would suggest that you restore your original change and work to
> > reproduce the failure.  I don't know if you were not building with NLS
> > or had some other local configuration.  It seems that
> >
> > hint[] = _("...")
> >
> > cannot be valid C syntax unless _( ... ) is a no-op in your build and
> > the compiler sees a constant string.  The failure occurred for many
> > other developers.
> >
> > Thanks, David

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-07-02 13:38         ` David Edelsohn
@ 2020-07-02 15:47           ` David Edelsohn
  2020-07-03 13:22             ` David Edelsohn
  0 siblings, 1 reply; 14+ messages in thread
From: David Edelsohn @ 2020-07-02 15:47 UTC (permalink / raw)
  To: Mark Eggleston; +Cc: GCC Patches, Fortran List, Martin Sebor

Mark,

A quick test with

const char hint [] = _(" [see %<-fno-allow-invalid-boz%>]");

reproduces the failure.

const char *hint = _(" [see %<-fno-allow-invalid-boz%>]");

seems to work.  I will do a full bootstrap test with that change later today.

Do you want me to commit it if it works or do you want me to report it to you?

Thanks, David

On Thu, Jul 2, 2020 at 9:38 AM David Edelsohn <dje.gcc@gmail.com> wrote:
>
> On Thu, Jul 2, 2020 at 8:56 AM Mark Eggleston
> <mark.eggleston@codethink.co.uk> wrote:
> >
> > On 02/07/2020 13:25, David Edelsohn wrote:
> > > On Thu, Jul 2, 2020 at 6:16 AM Mark Eggleston
> > > <mark.eggleston@codethink.co.uk> wrote:
> > >> I've committed the change from array to pointer. Does this fix your builds?
> > >>
> > >> On 02/07/2020 08:18, Mark Eggleston wrote:
> > >>> On 01/07/2020 20:07, David Edelsohn wrote:
> > >>>> This patch breaks bootstrap.
> > >>> Apologies. I didn't see this when I built the compiler the with
> > >>> bootstrap on x86_64. I'll endevour to get it fixed as soon as possible.
> > > Mark,
> > >
> > > Your change did nothing because I previously had removed the
> > > translation markers to restore bootstrap.  You were not sufficiently
> > > observant to check the ChangeLog or notice that the line already was
> > > changed.
> > >
> > > Please stop making random, untested changes.  This is inappropriate
> > > for GCC development.
> > OK. I had no way of confirming as the bootstrap worked for me. I naively
> > thought that it was covered as an "obvious" fix.
> >
> > I was concerned that I caused a breakage and wanted to fix it.
> >
> > Regarding the ChangeLog I was unfamiliar with this situation and will
> > check them if this ever happens again (I hope not).  I'll also keep
> > portability issues in mind.
> >
> > I see the issue of the incorrect hint text has been addressed. As I
> > understand it the string as is will not make it to the pot file so will
> > not be translated, is that acceptable? I would like to be able to close
> > the PR.
>
> Mark,
>
> I reverted your change for that one line to restore bootstrap for
> everyone because Trunk should not be broken for 6 hours and it was
> trivial to revert that one, localized change without affecting the
> rest of your patch.
>
> The translation message for hint should be in the pot file
> translation.  This needs to be fixed correctly.
>
> I would suggest that you restore your original change and work to
> reproduce the failure.  I don't know if you were not building with NLS
> or had some other local configuration.  It seems that
>
> hint[] = _("...")
>
> cannot be valid C syntax unless _( ... ) is a no-op in your build and
> the compiler sees a constant string.  The failure occurred for many
> other developers.
>
> Thanks, David

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-07-02 12:56       ` Mark Eggleston
  2020-07-02 13:06         ` Mark Eggleston
@ 2020-07-02 13:38         ` David Edelsohn
  2020-07-02 15:47           ` David Edelsohn
  1 sibling, 1 reply; 14+ messages in thread
From: David Edelsohn @ 2020-07-02 13:38 UTC (permalink / raw)
  To: Mark Eggleston; +Cc: GCC Patches, Fortran List, Martin Sebor

On Thu, Jul 2, 2020 at 8:56 AM Mark Eggleston
<mark.eggleston@codethink.co.uk> wrote:
>
> On 02/07/2020 13:25, David Edelsohn wrote:
> > On Thu, Jul 2, 2020 at 6:16 AM Mark Eggleston
> > <mark.eggleston@codethink.co.uk> wrote:
> >> I've committed the change from array to pointer. Does this fix your builds?
> >>
> >> On 02/07/2020 08:18, Mark Eggleston wrote:
> >>> On 01/07/2020 20:07, David Edelsohn wrote:
> >>>> This patch breaks bootstrap.
> >>> Apologies. I didn't see this when I built the compiler the with
> >>> bootstrap on x86_64. I'll endevour to get it fixed as soon as possible.
> > Mark,
> >
> > Your change did nothing because I previously had removed the
> > translation markers to restore bootstrap.  You were not sufficiently
> > observant to check the ChangeLog or notice that the line already was
> > changed.
> >
> > Please stop making random, untested changes.  This is inappropriate
> > for GCC development.
> OK. I had no way of confirming as the bootstrap worked for me. I naively
> thought that it was covered as an "obvious" fix.
>
> I was concerned that I caused a breakage and wanted to fix it.
>
> Regarding the ChangeLog I was unfamiliar with this situation and will
> check them if this ever happens again (I hope not).  I'll also keep
> portability issues in mind.
>
> I see the issue of the incorrect hint text has been addressed. As I
> understand it the string as is will not make it to the pot file so will
> not be translated, is that acceptable? I would like to be able to close
> the PR.

Mark,

I reverted your change for that one line to restore bootstrap for
everyone because Trunk should not be broken for 6 hours and it was
trivial to revert that one, localized change without affecting the
rest of your patch.

The translation message for hint should be in the pot file
translation.  This needs to be fixed correctly.

I would suggest that you restore your original change and work to
reproduce the failure.  I don't know if you were not building with NLS
or had some other local configuration.  It seems that

hint[] = _("...")

cannot be valid C syntax unless _( ... ) is a no-op in your build and
the compiler sees a constant string.  The failure occurred for many
other developers.

Thanks, David

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-07-02 12:56       ` Mark Eggleston
@ 2020-07-02 13:06         ` Mark Eggleston
  2020-07-02 13:38         ` David Edelsohn
  1 sibling, 0 replies; 14+ messages in thread
From: Mark Eggleston @ 2020-07-02 13:06 UTC (permalink / raw)
  To: David Edelsohn; +Cc: GCC Patches, Martin Sebor, Fortran List


On 02/07/2020 13:56, Mark Eggleston wrote:
>
> On 02/07/2020 13:25, David Edelsohn wrote:
>> On Thu, Jul 2, 2020 at 6:16 AM Mark Eggleston
>> <mark.eggleston@codethink.co.uk> wrote:
>>> I've committed the change from array to pointer. Does this fix your 
>>> builds?
>>>
>>> On 02/07/2020 08:18, Mark Eggleston wrote:
>>>> On 01/07/2020 20:07, David Edelsohn wrote:
>>>>> This patch breaks bootstrap.
>>>> Apologies. I didn't see this when I built the compiler the with
>>>> bootstrap on x86_64. I'll endevour to get it fixed as soon as 
>>>> possible.
>> Mark,
>>
>> Your change did nothing because I previously had removed the
>> translation markers to restore bootstrap.  You were not sufficiently
>> observant to check the ChangeLog or notice that the line already was
>> changed.
>>
>> Please stop making random, untested changes.  This is inappropriate
>> for GCC development.
> OK. I had no way of confirming as the bootstrap worked for me. I 
> naively thought that it was covered as an "obvious" fix.
>
> I was concerned that I caused a breakage and wanted to fix it.
>
> Regarding the ChangeLog I was unfamiliar with this situation and will 
> check them if this ever happens again (I hope not).  I'll also keep 
> portability issues in mind.
>
> I see the issue of the incorrect hint text has been addressed.
whoops that's not true.
> As I understand it the string as is will not make it to the pot file 
> so will not be translated, is that acceptable? I would like to be able 
> to close the PR.
>
> regards,
>
> Mark
>
>> Thanks, David
>>
-- 
https://www.codethink.co.uk/privacy.html


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-07-02 12:25     ` David Edelsohn
@ 2020-07-02 12:56       ` Mark Eggleston
  2020-07-02 13:06         ` Mark Eggleston
  2020-07-02 13:38         ` David Edelsohn
  0 siblings, 2 replies; 14+ messages in thread
From: Mark Eggleston @ 2020-07-02 12:56 UTC (permalink / raw)
  To: David Edelsohn; +Cc: GCC Patches, Fortran List, Martin Sebor


On 02/07/2020 13:25, David Edelsohn wrote:
> On Thu, Jul 2, 2020 at 6:16 AM Mark Eggleston
> <mark.eggleston@codethink.co.uk> wrote:
>> I've committed the change from array to pointer. Does this fix your builds?
>>
>> On 02/07/2020 08:18, Mark Eggleston wrote:
>>> On 01/07/2020 20:07, David Edelsohn wrote:
>>>> This patch breaks bootstrap.
>>> Apologies. I didn't see this when I built the compiler the with
>>> bootstrap on x86_64. I'll endevour to get it fixed as soon as possible.
> Mark,
>
> Your change did nothing because I previously had removed the
> translation markers to restore bootstrap.  You were not sufficiently
> observant to check the ChangeLog or notice that the line already was
> changed.
>
> Please stop making random, untested changes.  This is inappropriate
> for GCC development.
OK. I had no way of confirming as the bootstrap worked for me. I naively 
thought that it was covered as an "obvious" fix.

I was concerned that I caused a breakage and wanted to fix it.

Regarding the ChangeLog I was unfamiliar with this situation and will 
check them if this ever happens again (I hope not).  I'll also keep 
portability issues in mind.

I see the issue of the incorrect hint text has been addressed. As I 
understand it the string as is will not make it to the pot file so will 
not be translated, is that acceptable? I would like to be able to close 
the PR.

regards,

Mark

> Thanks, David
>
-- 
https://www.codethink.co.uk/privacy.html


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-07-02 10:16   ` Mark Eggleston
  2020-07-02 12:17     ` David Edelsohn
@ 2020-07-02 12:25     ` David Edelsohn
  2020-07-02 12:56       ` Mark Eggleston
  1 sibling, 1 reply; 14+ messages in thread
From: David Edelsohn @ 2020-07-02 12:25 UTC (permalink / raw)
  To: Mark Eggleston; +Cc: GCC Patches, Fortran List, Martin Sebor

On Thu, Jul 2, 2020 at 6:16 AM Mark Eggleston
<mark.eggleston@codethink.co.uk> wrote:
>
> I've committed the change from array to pointer. Does this fix your builds?
>
> On 02/07/2020 08:18, Mark Eggleston wrote:
> > On 01/07/2020 20:07, David Edelsohn wrote:
> >> This patch breaks bootstrap.
> >
> > Apologies. I didn't see this when I built the compiler the with
> > bootstrap on x86_64. I'll endevour to get it fixed as soon as possible.

Mark,

Your change did nothing because I previously had removed the
translation markers to restore bootstrap.  You were not sufficiently
observant to check the ChangeLog or notice that the line already was
changed.

Please stop making random, untested changes.  This is inappropriate
for GCC development.

Thanks, David

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-07-02 10:16   ` Mark Eggleston
@ 2020-07-02 12:17     ` David Edelsohn
  2020-07-02 12:25     ` David Edelsohn
  1 sibling, 0 replies; 14+ messages in thread
From: David Edelsohn @ 2020-07-02 12:17 UTC (permalink / raw)
  To: Mark Eggleston; +Cc: GCC Patches, Fortran List, Martin Sebor

I already had removed your change.  I hope that you did not re-break bootstrap.

You should be re-producing the breakage and then confirming the fix,
not randomly applying patches and asking others if you didn't break it
again.  That is not appropriate for GCC development.

Thanks David

On Thu, Jul 2, 2020 at 6:16 AM Mark Eggleston
<mark.eggleston@codethink.co.uk> wrote:
>
> I've committed the change from array to pointer. Does this fix your builds?
>
> On 02/07/2020 08:18, Mark Eggleston wrote:
> > On 01/07/2020 20:07, David Edelsohn wrote:
> >> This patch breaks bootstrap.
> >
> > Apologies. I didn't see this when I built the compiler the with
> > bootstrap on x86_64. I'll endevour to get it fixed as soon as possible.
> >
> > regards,
> >
> > Mark
> >
> >> It is not portable to use _( ... ) to initialize an array.
> >>
> >> In file included from
> >> /nasfarm/edelsohn/src/src/gcc/fortran/gfortran.h:52,
> >>                   from /nasfarm/edelsohn/src/src/gcc/fortran/check.c:32:
> >> /nasfarm/edelsohn/src/src/gcc/fortran/check.c: In function 'bool
> >> gfc_invalid_boz
> >> (const char*, locus*)':
> >> /nasfarm/edelsohn/src/src/gcc/intl.h:51:27: error: initializer fails
> >> to determine size of 'hint'
> >>     51 | # define _(msgid) gettext (msgid)
> >>        |                   ~~~~~~~~^~~~~~~
> >> /nasfarm/edelsohn/src/src/gcc/fortran/check.c:70:23: note: in
> >> expansion of macro
> >>   '_'
> >>     70 |   const char hint[] = _(" [see %<-fno-allow-invalid-boz%>]");
> >>        |                       ^
> >> /nasfarm/edelsohn/src/src/gcc/intl.h:51:27: error: array must be
> >> initialized with a brace-enclosed initializer
> >>
> --
> https://www.codethink.co.uk/privacy.html
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-07-02  7:18 ` Mark Eggleston
@ 2020-07-02 10:16   ` Mark Eggleston
  2020-07-02 12:17     ` David Edelsohn
  2020-07-02 12:25     ` David Edelsohn
  0 siblings, 2 replies; 14+ messages in thread
From: Mark Eggleston @ 2020-07-02 10:16 UTC (permalink / raw)
  To: David Edelsohn; +Cc: GCC Patches, Fortran List, msebor

I've committed the change from array to pointer. Does this fix your builds?

On 02/07/2020 08:18, Mark Eggleston wrote:
> On 01/07/2020 20:07, David Edelsohn wrote:
>> This patch breaks bootstrap.
>
> Apologies. I didn't see this when I built the compiler the with 
> bootstrap on x86_64. I'll endevour to get it fixed as soon as possible.
>
> regards,
>
> Mark
>
>> It is not portable to use _( ... ) to initialize an array.
>>
>> In file included from 
>> /nasfarm/edelsohn/src/src/gcc/fortran/gfortran.h:52,
>>                   from /nasfarm/edelsohn/src/src/gcc/fortran/check.c:32:
>> /nasfarm/edelsohn/src/src/gcc/fortran/check.c: In function 'bool 
>> gfc_invalid_boz
>> (const char*, locus*)':
>> /nasfarm/edelsohn/src/src/gcc/intl.h:51:27: error: initializer fails
>> to determine size of 'hint'
>>     51 | # define _(msgid) gettext (msgid)
>>        |                   ~~~~~~~~^~~~~~~
>> /nasfarm/edelsohn/src/src/gcc/fortran/check.c:70:23: note: in 
>> expansion of macro
>>   '_'
>>     70 |   const char hint[] = _(" [see %<-fno-allow-invalid-boz%>]");
>>        |                       ^
>> /nasfarm/edelsohn/src/src/gcc/intl.h:51:27: error: array must be
>> initialized with a brace-enclosed initializer
>>
-- 
https://www.codethink.co.uk/privacy.html


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
  2020-07-01 19:07 David Edelsohn
@ 2020-07-02  7:18 ` Mark Eggleston
  2020-07-02 10:16   ` Mark Eggleston
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Eggleston @ 2020-07-02  7:18 UTC (permalink / raw)
  To: David Edelsohn; +Cc: GCC Patches, Fortran List

On 01/07/2020 20:07, David Edelsohn wrote:
> This patch breaks bootstrap.

Apologies. I didn't see this when I built the compiler the with 
bootstrap on x86_64. I'll endevour to get it fixed as soon as possible.

regards,

Mark

> It is not portable to use _( ... ) to initialize an array.
>
> In file included from /nasfarm/edelsohn/src/src/gcc/fortran/gfortran.h:52,
>                   from /nasfarm/edelsohn/src/src/gcc/fortran/check.c:32:
> /nasfarm/edelsohn/src/src/gcc/fortran/check.c: In function 'bool gfc_invalid_boz
> (const char*, locus*)':
> /nasfarm/edelsohn/src/src/gcc/intl.h:51:27: error: initializer fails
> to determine size of 'hint'
>     51 | # define _(msgid) gettext (msgid)
>        |                   ~~~~~~~~^~~~~~~
> /nasfarm/edelsohn/src/src/gcc/fortran/check.c:70:23: note: in expansion of macro
>   '_'
>     70 |   const char hint[] = _(" [see %<-fno-allow-invalid-boz%>]");
>        |                       ^
> /nasfarm/edelsohn/src/src/gcc/intl.h:51:27: error: array must be
> initialized with a brace-enclosed initializer
>
-- 
https://www.codethink.co.uk/privacy.html


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Fortran : Fortran translation issues PR52279
@ 2020-07-01 19:07 David Edelsohn
  2020-07-02  7:18 ` Mark Eggleston
  0 siblings, 1 reply; 14+ messages in thread
From: David Edelsohn @ 2020-07-01 19:07 UTC (permalink / raw)
  To: mark.eggleston; +Cc: GCC Patches, Fortran List

This patch breaks bootstrap.

It is not portable to use _( ... ) to initialize an array.

In file included from /nasfarm/edelsohn/src/src/gcc/fortran/gfortran.h:52,
                 from /nasfarm/edelsohn/src/src/gcc/fortran/check.c:32:
/nasfarm/edelsohn/src/src/gcc/fortran/check.c: In function 'bool gfc_invalid_boz
(const char*, locus*)':
/nasfarm/edelsohn/src/src/gcc/intl.h:51:27: error: initializer fails
to determine size of 'hint'
   51 | # define _(msgid) gettext (msgid)
      |                   ~~~~~~~~^~~~~~~
/nasfarm/edelsohn/src/src/gcc/fortran/check.c:70:23: note: in expansion of macro
 '_'
   70 |   const char hint[] = _(" [see %<-fno-allow-invalid-boz%>]");
      |                       ^
/nasfarm/edelsohn/src/src/gcc/intl.h:51:27: error: array must be
initialized with a brace-enclosed initializer

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-07-03 13:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25  6:28 Fortran : Fortran translation issues PR52279 Mark Eggleston
2020-06-30 12:59 ` Mark Eggleston
2020-06-30 13:11   ` Thomas Koenig
2020-07-01 17:56   ` Martin Sebor
2020-07-01 19:07 David Edelsohn
2020-07-02  7:18 ` Mark Eggleston
2020-07-02 10:16   ` Mark Eggleston
2020-07-02 12:17     ` David Edelsohn
2020-07-02 12:25     ` David Edelsohn
2020-07-02 12:56       ` Mark Eggleston
2020-07-02 13:06         ` Mark Eggleston
2020-07-02 13:38         ` David Edelsohn
2020-07-02 15:47           ` David Edelsohn
2020-07-03 13:22             ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).