[avr,committed,trunk,+,v6] Fix PR79453

Submitted by Georg-Johann Lay on April 18, 2017, 1:30 p.m.

Details

Message ID 29152683-8bad-f2f9-2e63-233b1f5cda3c@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay April 18, 2017, 1:30 p.m.
Applied the patchlet below to fix a translation hiccup in the AVR backend.

Johann

	PR target/79453
	* config/avr/avr.c (intl.h): Include it.
	(avr_pgm_check_var_decl) [reason]: Wrap	diagnostic snippets into _().

Patch hide | download patch | download mbox

Index: config/avr/avr.c
===================================================================
--- config/avr/avr.c	(revision 246964)
+++ config/avr/avr.c	(working copy)
@@ -20,6 +20,7 @@ 

  #include "config.h"
  #include "system.h"
+#include "intl.h"
  #include "coretypes.h"
  #include "backend.h"
  #include "target.h"
@@ -9797,28 +9798,28 @@  avr_pgm_check_var_decl (tree node)

      case VAR_DECL:
        if (as = avr_nonconst_pointer_addrspace (TREE_TYPE (node)), as)
-        reason = "variable";
+        reason = _("variable");
        break;

      case PARM_DECL:
        if (as = avr_nonconst_pointer_addrspace (TREE_TYPE (node)), as)
-        reason = "function parameter";
+        reason = _("function parameter");
        break;

      case FIELD_DECL:
        if (as = avr_nonconst_pointer_addrspace (TREE_TYPE (node)), as)
-        reason = "structure field";
+        reason = _("structure field");
        break;

      case FUNCTION_DECL:
        if (as = avr_nonconst_pointer_addrspace (TREE_TYPE (TREE_TYPE 
(node))),
            as)
-        reason = "return type of function";
+        reason = _("return type of function");
        break;

      case POINTER_TYPE:
        if (as = avr_nonconst_pointer_addrspace (node), as)
-        reason = "pointer";
+        reason = _("pointer");
        break;
      }