Possible errors in call to output_operand_lossage?

Philipp Thomas pthomas@suse.de
Wed Feb 6 10:25:00 GMT 2002


OK, here is the patch that adds all those comments. The changes for i386.c
and chris.c were a byproduct, but as they're also i18n related, I incluude
them in this patch.

Changes where checked by configuring a x-compiler for the given cpu and
then compiling the respective C file.

OK to check in?

2002-02-06  Philipp Thomas  <pthomas@suse.de>

	* final.c config/arc/arc.c config/a29k/a29k config/fr30/fr30.c
	config/m32r/m32r.c config/ia64/ia64.c config/m88k/m88k.c
	config/mips/mips.c config/romp/romp.c config/alpha/alpha.c
	config/sparc/sparc.c config/rs6000/rs6000.c: Mark messages to
	output_operand_lossage as not being printf style.
	Update copyright date where necessary.

	* config/i386/i386.c (print_operand): Mark string in sprintf
	for translation. Include intl.h.

	* config/cris/cris.c (cris_operand_lossage): Rename parameter
	to msgid so that exgettext recognizes it as translatable message.

2002-02-06  Philipp Thomas  <pthomas@suse.de>

	* gcc.pot: Regenerate.

Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.239
diff -u -p -r1.239 final.c
--- final.c	2002/02/05 00:29:01	1.239
+++ final.c	2002/02/06 17:20:38
@@ -3217,6 +3217,7 @@ output_asm_insn (template, operands)
 	    c = atoi (p);
 
 	    if (! ISDIGIT (*p))
+	      /* xgettext:no-c-format */
 	      output_operand_lossage ("operand number missing after %-letter");
 	    else if (this_is_asm_operands
 		     && (c < 0 || (unsigned int) c >= insn_noperands))
@@ -3278,6 +3279,7 @@ output_asm_insn (template, operands)
 	  output_operand (NULL_RTX, *p++);
 #endif
 	else
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("invalid %%-code");
 	break;
 
@@ -3309,6 +3311,7 @@ output_asm_label (x)
 	  && NOTE_LINE_NUMBER (x) == NOTE_INSN_DELETED_LABEL))
     ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x));
   else
+    /* xgettext:no-c-format */
     output_operand_lossage ("`%l' operand isn't a label");
 
   assemble_name (asm_out_file, buf);
Index: config/arc/arc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/arc.c,v
retrieving revision 1.26
diff -u -p -r1.26 arc.c
--- arc.c	2001/12/23 16:07:13	1.26
+++ arc.c	2002/02/06 17:20:38
@@ -1,5 +1,5 @@
 /* Subroutines used for code generation on the Argonaut ARC cpu.
-   Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001
+   Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of GNU CC.
@@ -1706,6 +1706,7 @@ arc_print_operand (file, x, code)
 	  fputc (']', file);
 	}
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %R code");
       return;
     case 'S' :
@@ -1738,6 +1739,7 @@ arc_print_operand (file, x, code)
 		   (long)(code == 'L' ? INTVAL (first) : INTVAL (second)));
 	}
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %H/%L code");
       return;
     case 'A' :
@@ -1762,6 +1764,7 @@ arc_print_operand (file, x, code)
 	    fputs (".a", file);
 	}
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %U code");
       return;
     case 'V' :
@@ -1773,6 +1776,7 @@ arc_print_operand (file, x, code)
 	    fputs (".di", file);
 	}
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %V code");
       return;
     case 0 :
Index: config/a29k/a29k.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/a29k/a29k.c,v
retrieving revision 1.24
diff -u -p -r1.24 a29k.c
--- a29k.c	2001/12/17 15:05:25	1.24
+++ a29k.c	2002/02/06 17:20:39
@@ -1,6 +1,6 @@
 /* Subroutines used for code generation on AMD Am29000.
    Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998,
-   1999, 2000 Free Software
+   1999, 2000, 2002 Free Software
    Foundation, Inc. 
    Contributed by Richard Kenner (kenner@nyu.edu)
 
@@ -1025,30 +1025,35 @@ print_operand (file, x, code)
       if (GET_CODE (x) == REG)
 	break;
       else if (! INT_P (x))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%Q value");
       fprintf (file, "%d", INT_LOWPART (x) & 0xff);
       return;
 
     case 'C':
       if (! INT_P (x))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%C value");
       fprintf (file, "%d", (~ INT_LOWPART (x)) & 0xff);
       return;
 
     case 'N':
       if (! INT_P (x))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%N value");
       fprintf (file, "%d", (- INT_LOWPART (x)) & 0xff);
       return;
 
     case 'M':
       if (! INT_P (x))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%M value");
       fprintf (file, "%d", INT_LOWPART (x) & 0xffff);
       return;
 
     case 'm':
       if (! INT_P (x))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%m value");
       fprintf (file, "%d", (INT_LOWPART (x) & 0xffff) << 16);
       return;
@@ -1151,17 +1156,20 @@ print_operand (file, x, code)
       else if (GET_CODE (x) == REG)
 	fprintf (file, "%s", reg_names[REGNO (x) + 1]);
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%L value");
       return;
 
     case 'O':
       if (GET_CODE (x) != REG)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%O value");
       fprintf (file, "%s", reg_names[REGNO (x) + 2]);
       return;
 
     case 'P':
       if (GET_CODE (x) != REG)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%P value");
       fprintf (file, "%s", reg_names[REGNO (x) + 3]);
       return;
@@ -1172,6 +1180,7 @@ print_operand (file, x, code)
 
     case 'V':
       if (GET_CODE (x) != PARALLEL)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%V value");
       fprintf (file, "%d", XVECLEN (x, 0) - 2);
       return;
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.359
diff -u -p -r1.359 i386.c
--- i386.c	2002/01/21 15:53:30	1.359
+++ i386.c	2002/02/06 17:20:39
@@ -42,6 +42,7 @@ Boston, MA 02111-1307, USA.  */
 #include "ggc.h"
 #include "target.h"
 #include "target-def.h"
+#include "intl.h"
 
 #ifndef CHECK_STACK_LIMIT
 #define CHECK_STACK_LIMIT (-1)
@@ -5832,7 +5833,7 @@ print_operand (file, x, code)
 	default:
 	  {
 	    char str[50];
-	    sprintf (str, "invalid operand code `%c'", code);
+	    sprintf (str, _("invalid operand code `%c'"), code);
 	    output_operand_lossage (str);
 	  }
 	}
Index: config/cris/cris.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris.c,v
retrieving revision 1.14
diff -u -p -r1.14 cris.c
--- cris.c	2002/01/27 03:44:58	1.14
+++ cris.c	2002/02/06 17:20:39
@@ -507,12 +507,12 @@ cris_op_str (x)
    categorization of the error.  */
 
 static void
-cris_operand_lossage (msg, op)
-     const char *msg;
+cris_operand_lossage (msgid, op)
+     const char *msgid;
      rtx op;
 {
   debug_rtx (op);
-  output_operand_lossage (msg);
+  output_operand_lossage (msgid);
 }
 
 /* Print an index part of an address to file.  */
Index: config/fr30/fr30.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/fr30/fr30.c,v
retrieving revision 1.21
diff -u -p -r1.21 fr30.c
--- fr30.c	2002/01/03 17:40:00	1.21
+++ fr30.c	2002/02/06 17:20:39
@@ -1,5 +1,5 @@
 /* FR30 specific functions.
-   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
 This file is part of GNU CC.
@@ -480,6 +480,7 @@ fr30_print_operand (file, x, code)
       /* Compute the register name of the second register in a hi/lo
 	 register pair.  */
       if (GET_CODE (x) != REG)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("fr30_print_operand: unrecognized %p code");
       else
 	fprintf (file, "r%d", REGNO (x) + 1);
@@ -500,6 +501,7 @@ fr30_print_operand (file, x, code)
 	case GTU: fprintf (file, "hi"); break;
 	case GEU: fprintf (file, "nc");  break;
 	default:
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("fr30_print_operand: unrecognized %b code");
 	  break;
 	}
@@ -521,6 +523,7 @@ fr30_print_operand (file, x, code)
 	case GTU: fprintf (file, "ls"); break;
 	case GEU: fprintf (file, "c"); break;
 	default:
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("fr30_print_operand: unrecognized %B code");
 	  break;
 	}
@@ -529,6 +532,7 @@ fr30_print_operand (file, x, code)
     case 'A':
       /* Print a signed byte value as an unsigned value.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("fr30_print_operand: invalid operand to %A code");
       else
 	{
@@ -546,6 +550,7 @@ fr30_print_operand (file, x, code)
       if (GET_CODE (x) != CONST_INT
 	  || INTVAL (x) < 16
 	  || INTVAL (x) > 32)
+	/* xgettext:no-c-format */
 	output_operand_lossage ("fr30_print_operand: invalid %x code");
       else
 	fprintf (file, "%d", INTVAL (x) - 16);
@@ -553,6 +558,7 @@ fr30_print_operand (file, x, code)
 
     case 'F':
       if (GET_CODE (x) != CONST_DOUBLE)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("fr30_print_operand: invalid %F code");
       else
 	{
Index: config/m32r/m32r.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.c,v
retrieving revision 1.41
diff -u -p -r1.41 m32r.c
--- m32r.c	2002/01/09 11:02:06	1.41
+++ m32r.c	2002/02/06 17:20:39
@@ -1,5 +1,5 @@
 /* Subroutines used for code generation on the Mitsubishi M32R cpu.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of GNU CC.
@@ -2245,6 +2245,7 @@ m32r_print_operand (file, x, code)
       if (GET_CODE (x) == REG)
 	fprintf (file, "@+%s", reg_names [REGNO (x)]);
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %s code");
       return;
       
@@ -2252,6 +2253,7 @@ m32r_print_operand (file, x, code)
       if (GET_CODE (x) == REG)
 	fprintf (file, "@%s+", reg_names [REGNO (x)]);
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %p code");
       return;
 
@@ -2275,6 +2277,7 @@ m32r_print_operand (file, x, code)
 	  fputc (')', file);
 	}
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %R code");
       return;
 
@@ -2298,6 +2301,7 @@ m32r_print_operand (file, x, code)
 		   code == 'L' ? INTVAL (first) : INTVAL (second));
 	}
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %H/%L code");
       return;
 
@@ -2360,6 +2364,7 @@ m32r_print_operand (file, x, code)
 	  fputc (')', file);
 	  return;
 	default :
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("invalid operand to %T/%B code");
 	  return;
 	}
@@ -2375,6 +2380,7 @@ m32r_print_operand (file, x, code)
 	    fputs (".a", file);
 	}
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %U code");
       return;
 
@@ -2383,6 +2389,7 @@ m32r_print_operand (file, x, code)
       if (GET_CODE (x) == CONST_INT)
 	output_addr_const (file, GEN_INT (- INTVAL (x)));
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid operand to %N code");
       return;
 
Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.139
diff -u -p -r1.139 ia64.c
--- ia64.c	2002/01/21 02:24:02	1.139
+++ ia64.c	2002/02/06 17:20:40
@@ -3522,6 +3522,7 @@ ia64_print_operand (file, x, code)
       else if (GET_CODE (x) == CONST_INT)
 	output_addr_const (file, x);
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%r value");
       return;
 
Index: config/m88k/m88k.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m88k/m88k.c,v
retrieving revision 1.56
diff -u -p -r1.56 m88k.c
--- m88k.c	2002/01/03 17:40:04	1.56
+++ m88k.c	2002/02/06 17:20:40
@@ -1,6 +1,6 @@
 /* Subroutines for insn-output.c for Motorola 88000.
    Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001 Free Software Foundation, Inc. 
+   2001, 2002 Free Software Foundation, Inc. 
    Contributed by Michael Tiemann (tiemann@mcc.com)
    Currently maintained by (gcc@dg-rtp.dg.com)
 
@@ -2879,6 +2879,7 @@ print_operand (file, x, code)
   if (sequencep)
     {
       if (code < 'B' || code > 'E')
+        /* xgettext:no-c-format */
 	output_operand_lossage ("%R not followed by %B/C/D/E");
       if (reversep)
 	xc = reverse_condition (xc);
@@ -2947,35 +2948,41 @@ print_operand (file, x, code)
       value >>= 16;
     case 'x': /* print the lower 16 bits of the integer constant in hex */
       if (xc != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %x/X value");
       fprintf (file, "0x%x", value & 0xffff); return;
 
     case 'H': /* print the low 16 bits of the negated integer constant */
       if (xc != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %H value");
       value = -value;
     case 'h': /* print the register or low 16 bits of the integer constant */
       if (xc == REG)
 	goto reg;
       if (xc != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %h value");
       fprintf (file, "%d", value & 0xffff);
       return;
 
     case 'Q': /* print the low 8 bits of the negated integer constant */
       if (xc != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %Q value");
       value = -value;
     case 'q': /* print the register or low 8 bits of the integer constant */
       if (xc == REG)
 	goto reg;
       if (xc != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %q value");
       fprintf (file, "%d", value & 0xff);
       return;
 
     case 'w': /* print the integer constant (X == 32 ? 0 : 32 - X) */
       if (xc != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %o value");
       fprintf (file, "%d", value == 32 ? 0 : 32 - value);
       return;
@@ -2983,6 +2990,7 @@ print_operand (file, x, code)
     case 'p': /* print the logarithm of the integer constant */
       if (xc != CONST_INT
 	  || (value = exact_log2 (value)) < 0)
+	/* xgettext:no-c-format */
 	output_operand_lossage ("invalid %p value");
       fprintf (file, "%d", value);
       return;
@@ -2996,11 +3004,13 @@ print_operand (file, x, code)
 	register int top, bottom;
 
 	if (xc != CONST_INT)
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("invalid %s/S value");
 	/* All the "one" bits must be contiguous.  If so, MASK will be
 	   a power of two or zero.  */
 	mask = (uval | (uval - 1)) + 1;
 	if (!(uval && POWER_OF_2_or_0 (mask)))
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("invalid %s/S value");
 	top = mask ? exact_log2 (mask) : 32;
 	bottom = exact_log2 (uval & ~(uval - 1));
@@ -3012,6 +3022,7 @@ print_operand (file, x, code)
       if (xc == LABEL_REF)
 	output_addr_const (file, x);
       else if (xc != PC)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %P operand");
       return;
 
@@ -3043,6 +3054,7 @@ print_operand (file, x, code)
 	case LE: fputs ("le0", file); return;
 	case LT: fputs ("lt0", file); return;
 	case GE: fputs ("ge0", file); return;
+	/* xgettext:no-c-format */
 	default: output_operand_lossage ("invalid %B value");
 	}
 
@@ -3060,6 +3072,7 @@ print_operand (file, x, code)
 	case LEU: fputs ("ls", file); return;
 	case LTU: fputs ("lo", file); return;
 	case GEU: fputs ("hs", file); return;
+	/* xgettext:no-c-format */
 	default:  output_operand_lossage ("invalid %C value");
 	}
 
@@ -3073,6 +3086,7 @@ print_operand (file, x, code)
 	case LE: fputs ("0xe", file); return;
 	case LT: fputs ("0x4", file); return;
 	case GE: fputs ("0xb", file); return;
+	/* xgettext:no-c-format */
 	default: output_operand_lossage ("invalid %D value");
 	}
 
@@ -3081,11 +3095,13 @@ print_operand (file, x, code)
 	{
 	case EQ: fputs ("0x8", file); return;
 	case NE: fputs ("0x7", file); return;
+	/* xgettext:no-c-format */
 	default: output_operand_lossage ("invalid %E value");
 	}
 
     case 'd': /* second register of a two register pair */
       if (xc != REG)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("`%d' operand isn't a register");
       fputs (reg_names[REGNO (x) + 1], file);
       return;
@@ -3097,6 +3113,7 @@ print_operand (file, x, code)
 	  return;
 	}
       else if (xc != REG)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %r value");
     case 0:
     name:
Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.175
diff -u -p -r1.175 mips.c
--- mips.c	2002/02/06 02:50:09	1.175
+++ mips.c	2002/02/06 17:20:40
@@ -1,6 +1,6 @@
 /* Subroutines for insn-output.c for MIPS
    Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by A. Lichnewsky, lich@inria.inria.fr.
    Changes by Michael Meissner, meissner@osf.org.
    64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
@@ -5686,6 +5686,7 @@ print_operand (file, op, letter)
     fputs (reg_names[GP_REG_FIRST], file);
 
   else if (letter == 'd' || letter == 'x' || letter == 'X')
+    /* xgettext:no-c-format */
     output_operand_lossage ("invalid use of %%d, %%x, or %%X");
 
   else if (letter == 'B')
Index: config/romp/romp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/romp/romp.c,v
retrieving revision 1.22
diff -u -p -r1.22 romp.c
--- romp.c	2002/01/03 17:40:05	1.22
+++ romp.c	2002/02/06 17:20:41
@@ -679,6 +679,7 @@ print_operand (file, x, code)
     case 'B':
       /* Byte number (const/8) */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%B value");
 
       fprintf (file, "%d", INTVAL (x) / 8);
@@ -687,6 +688,7 @@ print_operand (file, x, code)
     case 'L':
       /* Low order 16 bits of constant.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%L value");
 
       fprintf (file, "%d", INTVAL (x) & 0xffff);
@@ -695,6 +697,7 @@ print_operand (file, x, code)
     case 's':
       /* Null or "16" depending on whether the constant is greater than 16.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%s value");
 
       if (INTVAL (x) >= 16)
@@ -706,6 +709,7 @@ print_operand (file, x, code)
       /* For shifts: 's' will have given the half.  Just give the amount
 	 within 16.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%S value");
 
       fprintf (file, "%d", INTVAL (x) & 15);
@@ -715,6 +719,7 @@ print_operand (file, x, code)
       /* The number of a single bit set or cleared, mod 16.  Note that the ROMP
 	 numbers bits with the high-order bit 31.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%b value");
 
       if ((i = exact_log2 (INTVAL (x))) >= 0)
@@ -722,6 +727,7 @@ print_operand (file, x, code)
       else if ((i = exact_log2 (~ INTVAL (x))) >= 0)
 	fprintf (file, "%d", (31 - i) % 16);
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%b value");
 
       break;
@@ -729,6 +735,7 @@ print_operand (file, x, code)
     case 'h':
       /* "l" or "u" depending on which half of the constant is zero.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%h value");
 
       if ((INTVAL (x) & 0xffff0000) == 0)
@@ -736,6 +743,7 @@ print_operand (file, x, code)
       else if ((INTVAL (x) & 0xffff) == 0)
 	fprintf (file, "u");
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%h value");
 
       break;
@@ -743,6 +751,7 @@ print_operand (file, x, code)
     case 'H':
       /* Upper or lower half, depending on which half is zero.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%H value");
 
       if ((INTVAL (x) & 0xffff0000) == 0)
@@ -750,6 +759,7 @@ print_operand (file, x, code)
       else if ((INTVAL (x) & 0xffff) == 0)
 	fprintf (file, "%d", (INTVAL (x) >> 16) & 0xffff);
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%H value");
 
       break;
@@ -762,6 +772,7 @@ print_operand (file, x, code)
 		'uz'	if the low order part is all zeros 
        */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%z value");
 
       if ((INTVAL (x) & 0xffff0000) == 0)
@@ -773,6 +784,7 @@ print_operand (file, x, code)
       else if ((INTVAL (x) & 0xffff) == 0xffff)
 	fprintf (file, "uo");
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%z value");
 
       break;
@@ -781,6 +793,7 @@ print_operand (file, x, code)
       /* Upper or lower half, depending on which is non-zero or not
 	 all ones.  Must be consistent with 'z' above.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%Z value");
 
       if ((INTVAL (x) & 0xffff0000) == 0
@@ -789,6 +802,7 @@ print_operand (file, x, code)
       else if ((INTVAL (x) & 0xffff) == 0 || (INTVAL (x) & 0xffff) == 0xffff)
 	fprintf (file, "%d", (INTVAL (x) >> 16) & 0xffff);
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%Z value");
 
       break;
@@ -796,6 +810,7 @@ print_operand (file, x, code)
     case 'k':
       /* Same as 'z', except the trailing 'o' or 'z' is not written.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%k value");
 
       if ((INTVAL (x) & 0xffff0000) == 0
@@ -805,6 +820,7 @@ print_operand (file, x, code)
 	       || (INTVAL (x) & 0xffff) == 0xffff)
 	fprintf (file, "u");
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%k value");
 
       break;
@@ -812,6 +828,7 @@ print_operand (file, x, code)
     case 't':
       /* Similar to 's', except that we write 'h' or 'u'.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%k value");
 
       if (INTVAL (x) < 16)
@@ -897,6 +914,7 @@ print_operand (file, x, code)
 	  break;
 
 	default:
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("invalid %%j value");
 	}
       break;
@@ -940,6 +958,7 @@ print_operand (file, x, code)
 	  break;
 
 	default:
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("invalid %%j value");
 	}
       break;
@@ -970,6 +989,7 @@ print_operand (file, x, code)
       break;
 
     default:
+      /* xgettext:no-c-format */
       output_operand_lossage ("invalid %%xn code");
     }
 }
Index: config/alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.229
diff -u -p -r1.229 alpha.c
--- alpha.c	2002/02/04 17:44:26	1.229
+++ alpha.c	2002/02/06 17:20:41
@@ -1,6 +1,6 @@
 /* Subroutines used for code generation on the DEC Alpha.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001 Free Software Foundation, Inc. 
+   2000, 2001, 2002 Free Software Foundation, Inc. 
    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
 
 This file is part of GNU CC.
@@ -5158,6 +5158,7 @@ print_operand (file, x, code)
       if (GET_CODE (x) == HIGH)
 	output_addr_const (file, XEXP (x, 0));
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%H value");
       break;
 
@@ -5168,6 +5169,7 @@ print_operand (file, x, code)
 	    fprintf (file, "\t\t!lituse_jsr!%d", (int) INTVAL (x));
 	}
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%J value");
       break;
 
@@ -5178,6 +5180,7 @@ print_operand (file, x, code)
       else if (x == CONST0_RTX (GET_MODE (x)))
 	fprintf (file, "$31");
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%r value");
       break;
 
@@ -5188,12 +5191,14 @@ print_operand (file, x, code)
       else if (x == CONST0_RTX (GET_MODE (x)))
 	fprintf (file, "$f31");
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%R value");
       break;
 
     case 'N':
       /* Write the 1's complement of a constant.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%N value");
 
       fprintf (file, HOST_WIDE_INT_PRINT_DEC, ~ INTVAL (x));
@@ -5202,6 +5207,7 @@ print_operand (file, x, code)
     case 'P':
       /* Write 1 << C, for a constant C.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%P value");
 
       fprintf (file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) 1 << INTVAL (x));
@@ -5210,6 +5216,7 @@ print_operand (file, x, code)
     case 'h':
       /* Write the high-order 16 bits of a constant, sign-extended.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%h value");
 
       fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) >> 16);
@@ -5218,6 +5225,7 @@ print_operand (file, x, code)
     case 'L':
       /* Write the low-order 16 bits of a constant, sign-extended.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%L value");
 
       fprintf (file, HOST_WIDE_INT_PRINT_DEC,
@@ -5257,6 +5265,7 @@ print_operand (file, x, code)
 	  fprintf (file, HOST_WIDE_INT_PRINT_DEC, mask);
 	}
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%m value");
       break;
 
@@ -5265,6 +5274,7 @@ print_operand (file, x, code)
       if (GET_CODE (x) != CONST_INT
 	  || (INTVAL (x) != 8 && INTVAL (x) != 16
 	      && INTVAL (x) != 32 && INTVAL (x) != 64))
+	/* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%M value");
 
       fprintf (file, "%s",
@@ -5300,6 +5310,7 @@ print_operand (file, x, code)
 	fprintf (file, "q");
 #endif
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%U value");
       break;
 
@@ -5312,6 +5323,7 @@ print_operand (file, x, code)
 						     ? 56
 						     : 64)  
 	  || (INTVAL (x) & 7) != 0)
+	/* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%s value");
 
       fprintf (file, HOST_WIDE_INT_PRINT_DEC,
@@ -5326,6 +5338,7 @@ print_operand (file, x, code)
       if (GET_CODE (x) != CONST_INT
 	  && (unsigned HOST_WIDE_INT) INTVAL (x) >= 64
 	  && (INTVAL (x) & 7) != 8)
+	/* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%s value");
 
       fprintf (file, HOST_WIDE_INT_PRINT_DEC, (64 - INTVAL (x)) / 8);
@@ -5349,6 +5362,7 @@ print_operand (file, x, code)
 	enum rtx_code c = GET_CODE (x);
 
         if (GET_RTX_CLASS (c) != '<')
+          /* xgettext:no-c-format */
 	  output_operand_lossage ("invalid %%C value");
 
 	else if (code == 'D')
@@ -5386,6 +5400,7 @@ print_operand (file, x, code)
 	  fprintf (file, "rem%su", GET_MODE (x) == SImode ? "l" : "q");
 	  break;
 	default:
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("invalid %%E value");
 	  break;
 	}
@@ -5407,6 +5422,7 @@ print_operand (file, x, code)
       break;
 
     default:
+      /* xgettext:no-c-format */
       output_operand_lossage ("invalid %%xn code");
     }
 }
Index: config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.181
diff -u -p -r1.181 sparc.c
--- sparc.c	2002/02/04 18:16:06	1.181
+++ sparc.c	2002/02/06 17:20:42
@@ -1,6 +1,6 @@
 /* Subroutines for insn-output.c for Sun SPARC.
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
    64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
    at Cygnus Support.
@@ -5845,12 +5845,14 @@ print_operand (file, x, code)
       if (GET_CODE (x) == CONST_INT)
 	break;
       else if (GET_CODE (x) != REG)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%Y operand");
       else if (REGNO (x) < 8)
 	fputs (reg_names[REGNO (x)], file);
       else if (REGNO (x) >= 24 && REGNO (x) < 32)
 	fputs (reg_names[REGNO (x)-16], file);
       else
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%Y operand");
       return;
     case 'L':
@@ -5921,6 +5923,7 @@ print_operand (file, x, code)
 	case IOR: fputs ("or", file); break;
 	case AND: fputs ("and", file); break;
 	case XOR: fputs ("xor", file); break;
+	/* xgettext:no-c-format */
 	default: output_operand_lossage ("invalid %%A operand");
 	}
       return;
@@ -5931,6 +5934,7 @@ print_operand (file, x, code)
 	case IOR: fputs ("orn", file); break;
 	case AND: fputs ("andn", file); break;
 	case XOR: fputs ("xnor", file); break;
+	/* xgettext:no-c-format */
 	default: output_operand_lossage ("invalid %%B operand");
 	}
       return;
@@ -5969,6 +5973,7 @@ print_operand (file, x, code)
 	  case UNGT: fputs ("ug", file); break;
 	  case UNGE: fputs ("uge", file); break;
 	  case UNEQ: fputs ("ue", file); break;
+	  /* xgettext:no-c-format */
 	  default: output_operand_lossage (code == 'c'
 					   ? "invalid %%c operand"
 					   : "invalid %%C operand");
@@ -5991,6 +5996,7 @@ print_operand (file, x, code)
 	  case LT: fputs ("lz", file); break;
 	  case LE: fputs ("lez", file); break;
 	  case GT: fputs ("gz", file); break;
+	  /* xgettext:no-c-format */
 	  default: output_operand_lossage (code == 'd'
 					   ? "invalid %%d operand"
 					   : "invalid %%D operand");
@@ -6011,6 +6017,7 @@ print_operand (file, x, code)
     case 'f':
       /* Operand must be a MEM; write its address.  */
       if (GET_CODE (x) != MEM)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%f operand");
       output_address (XEXP (x, 0));
       return;
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.281
diff -u -p -r1.281 rs6000.c
--- rs6000.c	2002/02/05 02:18:55	1.281
+++ rs6000.c	2002/02/06 17:20:42
@@ -6061,6 +6061,7 @@ print_operand (file, x, code)
     case 'E':
       /* X is a CR register.  Print the number of the EQ bit of the CR */
       if (GET_CODE (x) != REG || ! CR_REGNO_P (REGNO (x)))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%E value");
       else
 	fprintf (file, "%d", 4 * (REGNO (x) - CR0_REGNO) + 2);
@@ -6070,6 +6071,7 @@ print_operand (file, x, code)
       /* X is a CR register.  Print the shift count needed to move it
 	 to the high-order four bits.  */
       if (GET_CODE (x) != REG || ! CR_REGNO_P (REGNO (x)))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%f value");
       else
 	fprintf (file, "%d", 4 * (REGNO (x) - CR0_REGNO));
@@ -6079,6 +6081,7 @@ print_operand (file, x, code)
       /* Similar, but print the count for the rotate in the opposite
 	 direction.  */
       if (GET_CODE (x) != REG || ! CR_REGNO_P (REGNO (x)))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%F value");
       else
 	fprintf (file, "%d", 32 - 4 * (REGNO (x) - CR0_REGNO));
@@ -6088,6 +6091,7 @@ print_operand (file, x, code)
       /* X is a constant integer.  If it is negative, print "m",
 	 otherwise print "z".  This is to make a aze or ame insn.  */
       if (GET_CODE (x) != CONST_INT)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%G value");
       else if (INTVAL (x) >= 0)
 	putc ('z', file);
@@ -6123,6 +6127,7 @@ print_operand (file, x, code)
       /* Write the bit number in CCR for jump.  */
       i = ccr_bit (x, 0);
       if (i == -1)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%j code");
       else
 	fprintf (file, "%d", i);
@@ -6133,6 +6138,7 @@ print_operand (file, x, code)
 	 scc flag to `ccr_bit'.  */
       i = ccr_bit (x, 1);
       if (i == -1)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%J code");
       else
 	/* If we want bit 31, write a shift count of zero, not 32.  */
@@ -6143,6 +6149,7 @@ print_operand (file, x, code)
       /* X must be a constant.  Write the 1's complement of the
 	 constant.  */
       if (! INT_P (x))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%k value");
       else
 	fprintf (file, HOST_WIDE_INT_PRINT_DEC, ~ INT_LOWPART (x));
@@ -6163,6 +6170,7 @@ print_operand (file, x, code)
 	      || (GET_CODE (XEXP (XEXP (x, 0), 0)) != SYMBOL_REF
 		  && GET_CODE (XEXP (XEXP (x, 0), 0)) != LABEL_REF)
 	      || GET_CODE (XEXP (XEXP (x, 0), 1)) != CONST_INT)
+	    /* xgettext:no-c-format */
 	    output_operand_lossage ("invalid %%K value");
 	  print_operand_address (file, XEXP (XEXP (x, 0), 0));
 	  fputs ("@l", file);
@@ -6199,6 +6207,7 @@ print_operand (file, x, code)
     case 'm':
       /* MB value for a mask operand.  */
       if (! mask_operand (x, VOIDmode))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%m value");
 
       val = INT_LOWPART (x);
@@ -6234,6 +6243,7 @@ print_operand (file, x, code)
     case 'M':
       /* ME value for a mask operand.  */
       if (! mask_operand (x, VOIDmode))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%M value");
 
       val = INT_LOWPART (x);
@@ -6272,6 +6282,7 @@ print_operand (file, x, code)
     case 'N':
       /* Write the number of elements in the vector times 4.  */
       if (GET_CODE (x) != PARALLEL)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%N value");
       else
 	fprintf (file, "%d", XVECLEN (x, 0) * 4);
@@ -6280,6 +6291,7 @@ print_operand (file, x, code)
     case 'O':
       /* Similar, but subtract 1 first.  */
       if (GET_CODE (x) != PARALLEL)
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%O value");
       else
 	fprintf (file, "%d", (XVECLEN (x, 0) - 1) * 4);
@@ -6290,6 +6302,7 @@ print_operand (file, x, code)
       if (! INT_P (x)
 	  || INT_LOWPART (x) < 0
 	  || (i = exact_log2 (INT_LOWPART (x))) < 0)
+	/* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%p value");
       else
 	fprintf (file, "%d", i);
@@ -6300,6 +6313,7 @@ print_operand (file, x, code)
 	 is the register number.  */
       if (GET_CODE (x) != MEM || GET_CODE (XEXP (x, 0)) != REG
 	  || REGNO (XEXP (x, 0)) >= 32)
+	/* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%P value");
       else
 	fprintf (file, "%d", REGNO (XEXP (x, 0)));
@@ -6327,6 +6341,7 @@ print_operand (file, x, code)
 	else if (code == XOR)
 	  t = tbl[2];
 	else
+	  /* xgettext:no-c-format */
 	  output_operand_lossage ("invalid %%q value");
 
 	if (GET_CODE (XEXP (x, 0)) != NOT)
@@ -6346,6 +6361,7 @@ print_operand (file, x, code)
     case 'R':
       /* X is a CR register.  Print the mask for `mtcrf'.  */
       if (GET_CODE (x) != REG || ! CR_REGNO_P (REGNO (x)))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%R value");
       else
 	fprintf (file, "%d", 128 >> (REGNO (x) - CR0_REGNO));
@@ -6354,6 +6370,7 @@ print_operand (file, x, code)
     case 's':
       /* Low 5 bits of 32 - value */
       if (! INT_P (x))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%s value");
       else
 	fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INT_LOWPART (x)) & 31);
@@ -6364,6 +6381,7 @@ print_operand (file, x, code)
 	 CONST_INT 32-bit mask is considered sign-extended so any
 	 transition must occur within the CONST_INT, not on the boundary.  */
       if (! mask64_operand (x, VOIDmode))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%S value");
 
       val = INT_LOWPART (x);
@@ -6390,6 +6408,7 @@ print_operand (file, x, code)
 	/* i = index of last set bit from right
 	   mask begins at 63 - i from left */
 	  if (i > 63)
+	    /* xgettext:no-c-format */
 	    output_operand_lossage ("%%S computed all 1's mask");
 
 	  fprintf (file, "%d", 63 - i);
@@ -6417,6 +6436,7 @@ print_operand (file, x, code)
 	/* i = index of last clear bit from right
 	   mask ends at 62 - i from left */
 	  if (i > 62)
+	    /* xgettext:no-c-format */
 	    output_operand_lossage ("%%S computed all 0's mask");
 
 	  fprintf (file, "%d", 62 - i);
@@ -6427,6 +6447,7 @@ print_operand (file, x, code)
       /* Print the symbolic name of a branch target register.  */
       if (GET_CODE (x) != REG || (REGNO (x) != LINK_REGISTER_REGNUM
 				  && REGNO (x) != COUNT_REGISTER_REGNUM))
+	/* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%T value");
       else if (REGNO (x) == LINK_REGISTER_REGNUM)
 	fputs (TARGET_NEW_MNEMONICS ? "lr" : "r", file);
@@ -6437,6 +6458,7 @@ print_operand (file, x, code)
     case 'u':
       /* High-order 16 bits of constant for use in unsigned operand.  */
       if (! INT_P (x))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%u value");
       else
 	fprintf (file, HOST_WIDE_INT_PRINT_HEX, 
@@ -6446,6 +6468,7 @@ print_operand (file, x, code)
     case 'v':
       /* High-order 16 bits of constant for use in signed operand.  */
       if (! INT_P (x))
+        /* xgettext:no-c-format */
 	output_operand_lossage ("invalid %%v value");
       else
 	fprintf (file, HOST_WIDE_INT_PRINT_HEX,
@@ -6662,6 +6685,7 @@ print_operand (file, x, code)
       return;
 
     default:
+      /* xgettext:no-c-format */
       output_operand_lossage ("invalid %%xn code");
     }
 }


-- 
Philipp Thomas <pthomas@suse.de>
SuSE Linux AG, Deutscherrnstr. 15-19, D-90429 Nuremberg, Germany



More information about the Gcc-patches mailing list