This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Use gcc-internal-format instead of c-format or nothing in gcc.pot where needed


On Tue, May 31, 2005 at 07:21:29PM +0200, Bruno Haible wrote:
> Jakub Jelinek wrote:
> > xgettext test.c --language=GCC-source --keyword=error --keyword=warning:2 \
> > --keyword=fnotice:2 --keyword=_ --flag=error:1:gcc-internal-format \
> > --flag=warning:2:gcc-internal-format --flag=fnotice:2:c-format
> >
> > doesn't do this, it will mark error and warning string literals
> > as gcc-internal-format, but not mark "%g\n" as c-format.
> 
> Indeed. That's a bug.
> 
> As a workaround, you can use two xgettext invocations: one which will
> provide the gcc-internal-format annotations, and one which will
> provide the c-format ones. Merging the two (via xgettext again) will
> combine the annotations.

Ok, that seems to work.  I get 2 weirdo warnings:
/usr/bin/xgettext: po/gcc.pot.tmp1: warning: Charset "CHARSET" is not a portable encoding name.
                                             Message conversion to user's charset might not work.
/usr/bin/xgettext: po/gcc.pot.tmp2: warning: Charset "CHARSET" is not a portable encoding name.
                                             Message conversion to user's charset might not work.
(charset=CHARSET is what xgettext generates, so I'm not sure if I should set it to
charset=UTF-8 in exgettext), but other than that it seems to work.

Here is the patch.
The new convention it adds are:
1) G_() should be used instead of N_() to mark strings to be
   gcc-internal-format, but otherwise be a nop at runtime.
   This is desirable if you know such a string will be passed
   to the GCC diagnostic routines (like error, warning, warning0,
   etc.)
2) macros/functions that have .*msgid argument are assumed they
   pass that argument through gettext () before printing it.
   But newly, if the argument is called gmsgid, it is passed to
   GCC diagnostic (i.e. pp_format_text), if it is called cmsgid,
   it is passed to a printf like function in the C library.
   Plain msgid is unknown.

The patch assumes gettext 0.14.5 or later, not sure how we should
enforce it (and not sure for which operations is that version really
necessary, only for make gcc.pot and msgmerge or also for msgfmt?).
Also, the patch is against HEAD, but as 4.0 and HEAD uses the same
.po files, not sure if we need a 4.0 version of the patch as well.

I have verified the generated gcc.pot has exactly the same msgid's
as gcc.pot generated without this patch, the only difference (appart
from reshuffling of the messages in the gcc.pot file) are
, gcc-internal-format
and
, c-format
markings.

2005-06-01  Jakub Jelinek  <jakub@redhat.com>

gcc/po/
	* exgettext: Handle gmsgid and cmsgid arguments specially,
	as gcc-internal-format and c-format.  Because of xgettext
	bug, invoke xgettext once with --language=c, once with
	--language=GCC-source and then merge together.
gcc/
	* intl.h (G_): New macro.
	* rtl-error.c (error_for_asm, warning_for_asm): Use gmsgid
	instead of msgid for argument name.
	* tree-ssa.c (warn_uninit): Likewise.
	* c-parser.c (c_parser_error): Likewise.
	* config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise.
	* config/darwin-c.c (BAD): Likewise.
	* config/c4x/c4x-c.c (BAD): Likewise.
	* c-pragma.c (GCC_BAD, GCC_BAD2): Likewise.
	* c-errors.c (pedwarn_c99, pedwarn_c90): Likewise.
	* c-common.c (c_parse_error): Likewise.
	* diagnostic.c (diagnostic_set_info, verbatim, inform, warning,
	warning0, pedwarn, error, sorry, fatal_error, internal_error):
	Likewise.
	(fnotice): Use cmsgid instead of msgid for argument name.
	* gcov.c (fnotice): Likewise.
	* protoize.c (notice): Likewise.
	* final.c (output_operand_lossage): Likewise.
	* gcc.c (fatal, notice): Likewise.
	(error): Use gmsgid instead of msgid for argument name.
	* collect2.c (notice, fatal_perror, fatal): Use cmsgid instead
	of msgid for argument name.
	(error): Use gmsgid instead of msgid for argument name.
	* c-decl.c (locate_old_decl, implicit_decl_warning): Use G_()
	instead of N_().
	* c-typeck.c (readonly_error, convert_for_assignment): Likewise.
	* tree-inline.c (inline_forbidden_p_1): Likewise.
gcc/cp/
	* error.c (locate_error): Use gmsgid instead of msgid for argument
	name.
	(cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
gcc/java/
	* jv-scan.c (fatal_error, warning, warning0: Use gmsgid instead of
	msgid for argument name.
	* gjavah.c (error): Likewise.

--- gcc/po/exgettext.jj	2005-05-18 14:28:21.000000000 +0200
+++ gcc/po/exgettext	2005-06-01 13:40:30.000000000 +0200
@@ -55,6 +55,7 @@ trap "rm -r $T" 0
 
 pwd=`${PWDCMD-pwd}`
 kopt=$pwd/$T/keyword-options
+kopt2=$pwd/$T/keyword2-options
 emsg=$pwd/$T/emsgids.c
 posr=$pwd/$T/po-sources
 
@@ -81,7 +82,7 @@ echo "scanning for keywords and %e strin
         done
     done;
   } | tr ' ' "$nl" | grep -v '\*' |
-  $AWK -v excl=po/EXCLUDES -v posr=$posr -v kopt=$kopt -v emsg=$emsg '
+  $AWK -v excl=po/EXCLUDES -v posr=$posr -v kopt=$kopt -v kopt2=$kopt2 -v emsg=$emsg '
 function keyword_option(line) {
     paren_index = index(line, "(")
     name = substr(line, 1, paren_index - 1)
@@ -95,12 +96,28 @@ function keyword_option(line) {
     for (n = 1; sub(/^[^,]*,/, "", args); n++) {
 	continue
     }
+    format=""
+    if (args ~ /g$/)
+    	format="gcc-internal-format"
+    else if (args ~ /c$/)
+    	format="c-format"
+
+    if (n == 1) { keyword = "--keyword=" name }
+    else { keyword = "--keyword=" name ":" n }
+    if (format) {
+        keyword=keyword "\n--flag=" name ":" n ":" format
+    }
 
-    if (n == 1) { keyword = name }
-    else        { keyword = name ":" n }
-
-    if (! keyword_seen[keyword]++) {
-	print "--keyword=" keyword > kopt
+    if (! keyword_seen[name]) {
+	if (format == "gcc-internal-format")
+		print keyword > kopt2
+	else
+		print keyword > kopt
+    	keyword_seen[name] = keyword
+    } else if (keyword_seen[name] != keyword) {
+	printf("%s used incompatibly as both %s and %s\n",
+	       name, keyword_seen[name], keyword)
+	exit (1)
     }
 }
 
@@ -155,7 +172,7 @@ END {
     }
     print emsg > posr
 }'
-)
+) || exit
 
 echo "scanning option files..." >&2
 
@@ -186,7 +203,17 @@ $xgettext --default-domain=$package --di
 	  --add-comments `cat $kopt` --files-from=$posr \
 	  --copyright-holder="Free Software Foundation, Inc." \
 	  --msgid-bugs-address="http://gcc.gnu.org/bugs.html"; \
-	  --language=c -o po/$package.pot.tmp
+	  --language=c -o po/$package.pot.tmp1
+$xgettext --default-domain=$package --directory=$srcdir \
+	  --add-comments --keyword= `cat $kopt2` --files-from=$posr \
+	  --copyright-holder="Free Software Foundation, Inc." \
+	  --msgid-bugs-address="http://gcc.gnu.org/bugs.html"; \
+	  --language=GCC-source -o po/$package.pot.tmp2
+$xgettext --default-domain=$package \
+	  --add-comments po/$package.pot.tmp1 po/$package.pot.tmp2 \
+	  --copyright-holder="Free Software Foundation, Inc." \
+	  --msgid-bugs-address="http://gcc.gnu.org/bugs.html"; \
+	  --language=PO -o po/$package.pot.tmp
 # Remove local paths from .pot file.
 sed "s:$srcdir/::g;s:$pwd/::g;" <po/$package.pot.tmp >po/$package.pot
-rm po/$package.pot.tmp
+rm po/$package.pot.tmp po/$package.pot.tmp1 po/$package.pot.tmp2
--- gcc/intl.h.jj	2004-06-09 00:00:57.000000000 +0200
+++ gcc/intl.h	2005-06-01 13:13:50.000000000 +0200
@@ -51,6 +51,10 @@ extern size_t gcc_gettext_width (const c
 # define N_(msgid) msgid
 #endif
 
+#ifndef G_
+# define G_(gmsgid) gmsgid
+#endif
+
 extern const char *open_quote;
 extern const char *close_quote;
 
--- gcc/rtl-error.c.jj	2004-10-16 09:01:56.000000000 +0200
+++ gcc/rtl-error.c	2005-05-31 23:03:13.000000000 +0200
@@ -87,22 +87,22 @@ diagnostic_for_asm (rtx insn, const char
 }
 
 void
-error_for_asm (rtx insn, const char *msgid, ...)
+error_for_asm (rtx insn, const char *gmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_for_asm (insn, msgid, &ap, DK_ERROR);
+  va_start (ap, gmsgid);
+  diagnostic_for_asm (insn, gmsgid, &ap, DK_ERROR);
   va_end (ap);
 }
 
 void
-warning_for_asm (rtx insn, const char *msgid, ...)
+warning_for_asm (rtx insn, const char *gmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_for_asm (insn, msgid, &ap, DK_WARNING);
+  va_start (ap, gmsgid);
+  diagnostic_for_asm (insn, gmsgid, &ap, DK_WARNING);
   va_end (ap);
 }
 
--- gcc/c-decl.c.jj	2005-05-19 09:31:10.000000000 +0200
+++ gcc/c-decl.c	2005-06-01 13:23:39.000000000 +0200
@@ -1124,11 +1124,11 @@ locate_old_decl (tree decl, void (*diag)
   if (TREE_CODE (decl) == FUNCTION_DECL && DECL_BUILT_IN (decl))
     ;
   else if (DECL_INITIAL (decl))
-    diag (N_("%Jprevious definition of %qD was here"), decl, decl);
+    diag (G_("%Jprevious definition of %qD was here"), decl, decl);
   else if (C_DECL_IMPLICIT (decl))
-    diag (N_("%Jprevious implicit declaration of %qD was here"), decl, decl);
+    diag (G_("%Jprevious implicit declaration of %qD was here"), decl, decl);
   else
-    diag (N_("%Jprevious declaration of %qD was here"), decl, decl);
+    diag (G_("%Jprevious declaration of %qD was here"), decl, decl);
 }
 
 /* Subroutine of duplicate_decls.  Compare NEWDECL to OLDDECL.
@@ -2286,7 +2286,7 @@ implicit_decl_warning (tree id, tree old
     default: gcc_unreachable ();
     }
 
-  diag (N_("implicit declaration of function %qE"), id);
+  diag (G_("implicit declaration of function %qE"), id);
   if (olddecl)
     locate_old_decl (olddecl, diag);
 }
--- gcc/tree-ssa.c.jj	2005-05-25 17:15:42.000000000 +0200
+++ gcc/tree-ssa.c	2005-05-31 14:47:22.000000000 +0200
@@ -1079,7 +1079,7 @@ walk_use_def_chains (tree var, walk_use_
    warning text is in MSGID and LOCUS may contain a location or be null.  */
 
 static void
-warn_uninit (tree t, const char *msgid, void *data)
+warn_uninit (tree t, const char *gmsgid, void *data)
 {
   tree var = SSA_NAME_VAR (t);
   tree def = SSA_NAME_DEF_STMT (t);
@@ -1107,7 +1107,7 @@ warn_uninit (tree t, const char *msgid, 
   locus = (context != NULL && EXPR_HAS_LOCATION (context)
 	   ? EXPR_LOCUS (context)
 	   : &DECL_SOURCE_LOCATION (var));
-  warning (0, msgid, locus, var);
+  warning (0, gmsgid, locus, var);
   TREE_NO_WARNING (var) = 1;
 }
    
--- gcc/c-parser.c.jj	2005-05-16 09:44:20.000000000 +0200
+++ gcc/c-parser.c	2005-05-31 22:56:16.000000000 +0200
@@ -635,18 +635,18 @@ c_parser_new (void)
    used.  */
 
 static void
-c_parser_error (c_parser *parser, const char *msgid)
+c_parser_error (c_parser *parser, const char *gmsgid)
 {
   c_token *token = c_parser_peek_token (parser);
   if (parser->error)
     return;
   parser->error = true;
-  if (!msgid)
+  if (!gmsgid)
     return;
   /* This diagnostic makes more sense if it is tagged to the line of
      the token we just peeked at.  */
   c_parser_set_source_position_from_token (token);
-  c_parse_error (msgid,
+  c_parse_error (gmsgid,
 		 /* Because c_parse_error does not understand
 		    CPP_KEYWORD, keywords are treated like
 		    identifiers.  */
--- gcc/gcc.c.jj	2005-05-16 09:44:25.000000000 +0200
+++ gcc/gcc.c	2005-05-31 14:58:56.000000000 +0200
@@ -6716,40 +6716,46 @@ fancy_abort (const char *file, int line,
 /* Output an error message and exit.  */
 
 void
-fatal (const char *msgid, ...)
+fatal (const char *cmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
+  va_start (ap, cmsgid);
 
   fprintf (stderr, "%s: ", programname);
-  vfprintf (stderr, _(msgid), ap);
+  vfprintf (stderr, _(cmsgid), ap);
   va_end (ap);
   fprintf (stderr, "\n");
   delete_temp_files ();
   exit (1);
 }
 
+/* The argument is actually c-format, not gcc-internal-format,
+   but because functions with identical names are used through
+   the rest of the compiler with gcc-internal-format, we just
+   need to hope all users of these functions use the common
+   subset between c-format and gcc-internal-format.  */
+
 void
-error (const char *msgid, ...)
+error (const char *gmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
+  va_start (ap, gmsgid);
   fprintf (stderr, "%s: ", programname);
-  vfprintf (stderr, _(msgid), ap);
+  vfprintf (stderr, _(gmsgid), ap);
   va_end (ap);
 
   fprintf (stderr, "\n");
 }
 
 static void
-notice (const char *msgid, ...)
+notice (const char *cmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
-  vfprintf (stderr, _(msgid), ap);
+  va_start (ap, cmsgid);
+  vfprintf (stderr, _(cmsgid), ap);
   va_end (ap);
 }
 
--- gcc/config/rs6000/rs6000-c.c.jj	2005-05-06 09:58:38.000000000 +0200
+++ gcc/config/rs6000/rs6000-c.c	2005-05-31 14:33:09.000000000 +0200
@@ -50,8 +50,8 @@ static tree altivec_resolve_overloaded_b
    whether or not new function declarations receive a longcall
    attribute by default.  */
 
-#define SYNTAX_ERROR(msgid) do {			\
-  warning (0, msgid);					\
+#define SYNTAX_ERROR(gmsgid) do {			\
+  warning (0, gmsgid);					\
   warning (0, "ignoring malformed #pragma longcall");	\
   return;						\
 } while (0)
--- gcc/config/darwin-c.c.jj	2005-04-29 09:18:11.000000000 +0200
+++ gcc/config/darwin-c.c	2005-05-31 14:36:05.000000000 +0200
@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA.  */
 
 /* Pragmas.  */
 
-#define BAD(msgid) do { warning (0, msgid); return; } while (0)
+#define BAD(gmsgid) do { warning (0, gmsgid); return; } while (0)
 
 static bool using_frameworks = false;
 
--- gcc/config/c4x/c4x-c.c.jj	2005-04-25 11:56:20.000000000 +0200
+++ gcc/config/c4x/c4x-c.c	2005-05-31 14:35:47.000000000 +0200
@@ -57,7 +57,7 @@ static int c4x_parse_pragma (const char 
    the STRING_CST node of the string.  If SECT is null, then this
    pragma doesn't take a section string.  Returns 0 for a good pragma,
    -1 for a malformed pragma.  */
-#define BAD(msgid, arg) do { warning (0, msgid, arg); return -1; } while (0)
+#define BAD(gmsgid, arg) do { warning (0, gmsgid, arg); return -1; } while (0)
 
 static int
 c4x_parse_pragma (name, func, sect)
--- gcc/cp/error.c.jj	2005-05-25 11:52:16.000000000 +0200
+++ gcc/cp/error.c	2005-05-31 14:41:28.000000000 +0200
@@ -2326,13 +2326,13 @@ cp_printer (pretty_printer *pp, text_inf
    behavior of cp_*_at.  */
 
 static tree
-locate_error (const char *msgid, va_list ap)
+locate_error (const char *gmsgid, va_list ap)
 {
   tree here = 0, t;
   int plus = 0;
   const char *f;
 
-  for (f = msgid; *f; f++)
+  for (f = gmsgid; *f; f++)
     {
       plus = 0;
       if (*f == '%')
@@ -2388,57 +2388,57 @@ locate_error (const char *msgid, va_list
 
 
 void
-cp_error_at (const char *msgid, ...)
+cp_error_at (const char *gmsgid, ...)
 {
   tree here;
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  here = locate_error (msgid, ap);
+  va_start (ap, gmsgid);
+  here = locate_error (gmsgid, ap);
   va_end (ap);
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap,
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap,
                        input_location, DK_ERROR);
   cp_diagnostic_starter (global_dc, &diagnostic);
-  diagnostic_set_info (&diagnostic, msgid, &ap,
+  diagnostic_set_info (&diagnostic, gmsgid, &ap,
                        location_of (here), DK_ERROR);
   report_diagnostic (&diagnostic);
   va_end (ap);
 }
 
 void
-cp_warning_at (const char *msgid, ...)
+cp_warning_at (const char *gmsgid, ...)
 {
   tree here;
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  here = locate_error (msgid, ap);
+  va_start (ap, gmsgid);
+  here = locate_error (gmsgid, ap);
   va_end (ap);
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap,
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap,
                        location_of (here), DK_WARNING);
   report_diagnostic (&diagnostic);
   va_end (ap);
 }
 
 void
-cp_pedwarn_at (const char *msgid, ...)
+cp_pedwarn_at (const char *gmsgid, ...)
 {
   tree here;
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  here = locate_error (msgid, ap);
+  va_start (ap, gmsgid);
+  here = locate_error (gmsgid, ap);
   va_end (ap);
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap,
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap,
                        location_of (here), pedantic_error_kind());
   report_diagnostic (&diagnostic);
   va_end (ap);
--- gcc/java/jv-scan.c.jj	2005-04-29 09:18:37.000000000 +0200
+++ gcc/java/jv-scan.c	2005-05-31 15:15:33.000000000 +0200
@@ -40,10 +40,10 @@ Boston, MA 02111-1307, USA.  */
 
 #include <getopt.h>
 
-extern void fatal_error (const char *msgid, ...)
+extern void fatal_error (const char *gmsgid, ...)
      ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-void warning (int opt, const char *msgid, ...) ATTRIBUTE_PRINTF_2;
-void warning0 (const char *msgid, ...) ATTRIBUTE_PRINTF_1;
+void warning (int opt, const char *gmsgid, ...) ATTRIBUTE_PRINTF_2;
+void warning0 (const char *gmsgid, ...) ATTRIBUTE_PRINTF_1;
 void report (void);
 
 static void usage (void) ATTRIBUTE_NORETURN;
@@ -245,38 +245,40 @@ main (int argc, char **argv)
 
 
 /* Error report, memory, obstack initialization and other utility
-   functions */
+   functions.  Use actually c-format msgid, but as functions with
+   the same name elsewhere use gcc-internal-format, assume all users
+   here use intersection between c-format and gcc-internal-format.  */
 
 void
-fatal_error (const char *msgid, ...)
+fatal_error (const char *gmsgid, ...)
 {
   va_list ap;
-  va_start (ap, msgid);
+  va_start (ap, gmsgid);
   fprintf (stderr, _("%s: error: "), exec_name);
-  vfprintf (stderr, _(msgid), ap);
+  vfprintf (stderr, _(gmsgid), ap);
   fputc ('\n', stderr);
   va_end (ap);
   exit (1);
 }
 
 void
-warning (int opt ATTRIBUTE_UNUSED, const char *msgid, ...)
+warning (int opt ATTRIBUTE_UNUSED, const char *gmsgid, ...)
 {
   va_list ap;
-  va_start (ap, msgid);
+  va_start (ap, gmsgid);
   fprintf (stderr, _("%s: warning: "), exec_name);
-  vfprintf (stderr, _(msgid), ap);
+  vfprintf (stderr, _(gmsgid), ap);
   fputc ('\n', stderr);
   va_end (ap);
 }
 
 void
-warning0 (const char *msgid, ...)
+warning0 (const char *gmsgid, ...)
 {
   va_list ap;
-  va_start (ap, msgid);
+  va_start (ap, gmsgid);
   fprintf (stderr, _("%s: warning: "), exec_name);
-  vfprintf (stderr, _(msgid), ap);
+  vfprintf (stderr, _(gmsgid), ap);
   fputc ('\n', stderr);
   va_end (ap);
 }
--- gcc/java/gjavah.c.jj	2005-05-06 09:58:46.000000000 +0200
+++ gcc/java/gjavah.c	2005-05-31 15:16:33.000000000 +0200
@@ -164,7 +164,7 @@ static const unsigned char *
   decode_signature_piece (FILE *, const unsigned char *,
 			  const unsigned char *, int *);
 static void print_class_decls (FILE *, JCF *, int);
-static void error (const char *msgid, ...);
+static void error (const char *gmsgid, ...);
 static void usage (void) ATTRIBUTE_NORETURN;
 static void help (void) ATTRIBUTE_NORETURN;
 static void version (void) ATTRIBUTE_NORETURN;
@@ -266,16 +266,19 @@ static int decompiled = 0;
 
 #include "jcf-reader.c"
 
-/* Print an error message and set found_error.  */
+/* Print an error message and set found_error.
+   Not really gcc-internal-format message, but as error elsewhere
+   uses it, assume all users will use intersection between
+   c-format and gcc-internal-format.  */
 static void
-error (const char *msgid, ...)
+error (const char *gmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
+  va_start (ap, gmsgid);
 
   fprintf (stderr, TOOLNAME ": ");
-  vfprintf (stderr, _(msgid), ap);
+  vfprintf (stderr, _(gmsgid), ap);
   va_end (ap);
   fprintf (stderr, "\n");
   found_error = 1;
--- gcc/c-pragma.c.jj	2005-04-29 09:17:42.000000000 +0200
+++ gcc/c-pragma.c	2005-05-31 14:27:31.000000000 +0200
@@ -36,8 +36,9 @@ Software Foundation, 59 Temple Place - S
 #include "tm_p.h"
 #include "target.h"
 
-#define GCC_BAD(msgid) do { warning (0, msgid); return; } while (0)
-#define GCC_BAD2(msgid, arg) do { warning (0, msgid, arg); return; } while (0)
+#define GCC_BAD(gmsgid) do { warning (0, gmsgid); return; } while (0)
+#define GCC_BAD2(gmsgid, arg) \
+  do { warning (0, gmsgid, arg); return; } while (0)
 
 typedef struct align_stack GTY(())
 {
--- gcc/collect2.c.jj	2005-04-29 09:17:46.000000000 +0200
+++ gcc/collect2.c	2005-05-31 15:00:09.000000000 +0200
@@ -328,26 +328,26 @@ collect_exit (int status)
 
 /* Notify user of a non-error.  */
 void
-notice (const char *msgid, ...)
+notice (const char *cmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
-  vfprintf (stderr, _(msgid), ap);
+  va_start (ap, cmsgid);
+  vfprintf (stderr, _(cmsgid), ap);
   va_end (ap);
 }
 
 /* Die when sys call fails.  */
 
 void
-fatal_perror (const char * msgid, ...)
+fatal_perror (const char * cmsgid, ...)
 {
   int e = errno;
   va_list ap;
 
-  va_start (ap, msgid);
+  va_start (ap, cmsgid);
   fprintf (stderr, "collect2: ");
-  vfprintf (stderr, _(msgid), ap);
+  vfprintf (stderr, _(cmsgid), ap);
   fprintf (stderr, ": %s\n", xstrerror (e));
   va_end (ap);
 
@@ -357,13 +357,13 @@ fatal_perror (const char * msgid, ...)
 /* Just die.  */
 
 void
-fatal (const char * msgid, ...)
+fatal (const char * cmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
+  va_start (ap, cmsgid);
   fprintf (stderr, "collect2: ");
-  vfprintf (stderr, _(msgid), ap);
+  vfprintf (stderr, _(cmsgid), ap);
   fprintf (stderr, "\n");
   va_end (ap);
 
@@ -373,13 +373,13 @@ fatal (const char * msgid, ...)
 /* Write error message.  */
 
 void
-error (const char * msgid, ...)
+error (const char * gmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
+  va_start (ap, gmsgid);
   fprintf (stderr, "collect2: ");
-  vfprintf (stderr, _(msgid), ap);
+  vfprintf (stderr, _(gmsgid), ap);
   fprintf (stderr, "\n");
   va_end(ap);
 }
--- gcc/diagnostic.c.jj	2005-05-25 11:42:18.000000000 +0200
+++ gcc/diagnostic.c	2005-05-31 14:57:27.000000000 +0200
@@ -113,13 +113,13 @@ diagnostic_initialize (diagnostic_contex
 }
 
 void
-diagnostic_set_info (diagnostic_info *diagnostic, const char *msgid,
+diagnostic_set_info (diagnostic_info *diagnostic, const char *gmsgid,
 		     va_list *args, location_t location,
 		     diagnostic_t kind)
 {
   diagnostic->message.err_no = errno;
   diagnostic->message.args_ptr = args;
-  diagnostic->message.format_spec = _(msgid);
+  diagnostic->message.format_spec = _(gmsgid);
   diagnostic->location = location;
   diagnostic->kind = kind;
   diagnostic->option_index = 0;
@@ -396,15 +396,15 @@ trim_filename (const char *name)
 /* Text to be emitted verbatim to the error message stream; this
    produces no prefix and disables line-wrapping.  Use rarely.  */
 void
-verbatim (const char *msgid, ...)
+verbatim (const char *gmsgid, ...)
 {
   text_info text;
   va_list ap;
 
-  va_start (ap, msgid);
+  va_start (ap, gmsgid);
   text.err_no = errno;
   text.args_ptr = &ap;
-  text.format_spec = _(msgid);
+  text.format_spec = _(gmsgid);
   text.locus = NULL;
   pp_format_verbatim (global_dc->printer, &text);
   pp_flush (global_dc->printer);
@@ -414,13 +414,13 @@ verbatim (const char *msgid, ...)
 /* An informative note.  Use this for additional details on an error
    message.  */
 void
-inform (const char *msgid, ...)
+inform (const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location, DK_NOTE);
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, DK_NOTE);
   report_diagnostic (&diagnostic);
   va_end (ap);
 }
@@ -428,13 +428,13 @@ inform (const char *msgid, ...)
 /* A warning.  Use this for code which is correct according to the
    relevant language specification but is likely to be buggy anyway.  */
 void
-warning (int opt, const char *msgid, ...)
+warning (int opt, const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location, DK_WARNING);
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, DK_WARNING);
   diagnostic.option_index = opt;
 
   report_diagnostic (&diagnostic);
@@ -442,13 +442,13 @@ warning (int opt, const char *msgid, ...
 }
 
 void
-warning0 (const char *msgid, ...)
+warning0 (const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location, DK_WARNING);
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, DK_WARNING);
   report_diagnostic (&diagnostic);
   va_end (ap);
 }
@@ -462,13 +462,13 @@ warning0 (const char *msgid, ...)
    of the -pedantic command-line switch.  To get a warning enabled
    only with that switch, write "if (pedantic) pedwarn (...);"  */
 void
-pedwarn (const char *msgid, ...)
+pedwarn (const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location,
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location,
 		       pedantic_error_kind ());
   report_diagnostic (&diagnostic);
   va_end (ap);
@@ -477,13 +477,13 @@ pedwarn (const char *msgid, ...)
 /* A hard error: the code is definitely ill-formed, and an object file
    will not be produced.  */
 void
-error (const char *msgid, ...)
+error (const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location, DK_ERROR);
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, DK_ERROR);
   report_diagnostic (&diagnostic);
   va_end (ap);
 }
@@ -492,13 +492,13 @@ error (const char *msgid, ...)
    required by the relevant specification but not implemented by GCC.
    An object file will not be produced.  */
 void
-sorry (const char *msgid, ...)
+sorry (const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location, DK_SORRY);
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, DK_SORRY);
   report_diagnostic (&diagnostic);
   va_end (ap);
 }
@@ -507,13 +507,13 @@ sorry (const char *msgid, ...)
    continue.  Do not use this for internal consistency checks; that's
    internal_error.  Use of this function should be rare.  */
 void
-fatal_error (const char *msgid, ...)
+fatal_error (const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location, DK_FATAL);
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, DK_FATAL);
   report_diagnostic (&diagnostic);
   va_end (ap);
 
@@ -525,13 +525,13 @@ fatal_error (const char *msgid, ...)
    a more specific message, or some other good reason, you should use
    abort () instead of calling this function directly.  */
 void
-internal_error (const char *msgid, ...)
+internal_error (const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location, DK_ICE);
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, DK_ICE);
   report_diagnostic (&diagnostic);
   va_end (ap);
 
@@ -544,12 +544,12 @@ internal_error (const char *msgid, ...)
 /* Print a diagnostic MSGID on FILE.  This is just fprintf, except it
    runs its second argument through gettext.  */
 void
-fnotice (FILE *file, const char *msgid, ...)
+fnotice (FILE *file, const char *cmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
-  vfprintf (file, _(msgid), ap);
+  va_start (ap, cmsgid);
+  vfprintf (file, _(cmsgid), ap);
   va_end (ap);
 }
 
--- gcc/gcov.c.jj	2005-04-29 09:17:59.000000000 +0200
+++ gcc/gcov.c	2005-05-31 15:06:28.000000000 +0200
@@ -367,12 +367,12 @@ main (int argc, char **argv)
 }
 
 static void
-fnotice (FILE *file, const char *msgid, ...)
+fnotice (FILE *file, const char *cmsgid, ...)
 {
   va_list ap;
 
-  va_start (ap, msgid);
-  vfprintf (file, _(msgid), ap);
+  va_start (ap, cmsgid);
+  vfprintf (file, _(cmsgid), ap);
   va_end (ap);
 }
 
--- gcc/protoize.c.jj	2005-05-06 09:58:28.000000000 +0200
+++ gcc/protoize.c	2005-05-31 14:55:31.000000000 +0200
@@ -505,12 +505,12 @@ static char * saved_repl_write_ptr;
 
 /* Translate and output an error message.  */
 static void
-notice (const char *msgid, ...)
+notice (const char *cmsgid, ...)
 {
   va_list ap;
   
-  va_start (ap, msgid);
-  vfprintf (stderr, _(msgid), ap);
+  va_start (ap, cmsgid);
+  vfprintf (stderr, _(cmsgid), ap);
   va_end (ap);
 }
 
--- gcc/c-typeck.c.jj	2005-05-19 09:31:11.000000000 +0200
+++ gcc/c-typeck.c	2005-06-01 13:18:41.000000000 +0200
@@ -2870,20 +2870,20 @@ readonly_error (tree arg, enum lvalue_us
       if (TYPE_READONLY (TREE_TYPE (TREE_OPERAND (arg, 0))))
 	readonly_error (TREE_OPERAND (arg, 0), use);
       else
-	error (READONLY_MSG (N_("assignment of read-only member %qD"),
-			     N_("increment of read-only member %qD"),
-			     N_("decrement of read-only member %qD")),
+	error (READONLY_MSG (G_("assignment of read-only member %qD"),
+			     G_("increment of read-only member %qD"),
+			     G_("decrement of read-only member %qD")),
 	       TREE_OPERAND (arg, 1));
     }
   else if (TREE_CODE (arg) == VAR_DECL)
-    error (READONLY_MSG (N_("assignment of read-only variable %qD"),
-			 N_("increment of read-only variable %qD"),
-			 N_("decrement of read-only variable %qD")),
+    error (READONLY_MSG (G_("assignment of read-only variable %qD"),
+			 G_("increment of read-only variable %qD"),
+			 G_("decrement of read-only variable %qD")),
 	   arg);
   else
-    error (READONLY_MSG (N_("assignment of read-only location"),
-			 N_("increment of read-only location"),
-			 N_("decrement of read-only location")));
+    error (READONLY_MSG (G_("assignment of read-only location"),
+			 G_("increment of read-only location"),
+			 G_("decrement of read-only location")));
 }
 
 
@@ -3731,26 +3731,26 @@ convert_for_assignment (tree type, tree 
 		     function where an ordinary one is wanted, but not
 		     vice-versa.  */
 		  if (TYPE_QUALS (ttl) & ~TYPE_QUALS (ttr))
-		    WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE "
+		    WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE "
 					    "makes qualified function "
 					    "pointer from unqualified"),
-					 N_("assignment makes qualified "
+					 G_("assignment makes qualified "
 					    "function pointer from "
 					    "unqualified"),
-					 N_("initialization makes qualified "
+					 G_("initialization makes qualified "
 					    "function pointer from "
 					    "unqualified"),
-					 N_("return makes qualified function "
+					 G_("return makes qualified function "
 					    "pointer from unqualified"));
 		}
 	      else if (TYPE_QUALS (ttr) & ~TYPE_QUALS (ttl))
-		WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE discards "
+		WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE discards "
 					"qualifiers from pointer target type"),
-				     N_("assignment discards qualifiers "
+				     G_("assignment discards qualifiers "
 					"from pointer target type"),
-				     N_("initialization discards qualifiers "
+				     G_("initialization discards qualifiers "
 					"from pointer target type"),
-				     N_("return discards qualifiers from "
+				     G_("return discards qualifiers from "
 					"pointer target type"));
 	    }
 
@@ -3799,14 +3799,14 @@ convert_for_assignment (tree type, tree 
 		      which are not ANSI null ptr constants.  */
 		   && (!integer_zerop (rhs) || TREE_CODE (rhs) == NOP_EXPR)
 		   && TREE_CODE (ttl) == FUNCTION_TYPE)))
-	    WARN_FOR_ASSIGNMENT (N_("ISO C forbids passing argument %d of "
+	    WARN_FOR_ASSIGNMENT (G_("ISO C forbids passing argument %d of "
 				    "%qE between function pointer "
 				    "and %<void *%>"),
-				 N_("ISO C forbids assignment between "
+				 G_("ISO C forbids assignment between "
 				    "function pointer and %<void *%>"),
-				 N_("ISO C forbids initialization between "
+				 G_("ISO C forbids initialization between "
 				    "function pointer and %<void *%>"),
-				 N_("ISO C forbids return between function "
+				 G_("ISO C forbids return between function "
 				    "pointer and %<void *%>"));
 	  /* Const and volatile mean something different for function types,
 	     so the usual warnings are not appropriate.  */
@@ -3814,13 +3814,13 @@ convert_for_assignment (tree type, tree 
 		   && TREE_CODE (ttl) != FUNCTION_TYPE)
 	    {
 	      if (TYPE_QUALS (ttr) & ~TYPE_QUALS (ttl))
-		WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE discards "
+		WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE discards "
 					"qualifiers from pointer target type"),
-				     N_("assignment discards qualifiers "
+				     G_("assignment discards qualifiers "
 					"from pointer target type"),
-				     N_("initialization discards qualifiers "
+				     G_("initialization discards qualifiers "
 					"from pointer target type"),
-				     N_("return discards qualifiers from "
+				     G_("return discards qualifiers from "
 					"pointer target type"));
 	      /* If this is not a case of ignoring a mismatch in signedness,
 		 no warning.  */
@@ -3829,13 +3829,13 @@ convert_for_assignment (tree type, tree 
 		;
 	      /* If there is a mismatch, do warn.  */
 	      else if (warn_pointer_sign)
-		WARN_FOR_ASSIGNMENT (N_("pointer targets in passing argument "
+		WARN_FOR_ASSIGNMENT (G_("pointer targets in passing argument "
 					"%d of %qE differ in signedness"),
-				     N_("pointer targets in assignment "
+				     G_("pointer targets in assignment "
 					"differ in signedness"),
-				     N_("pointer targets in initialization "
+				     G_("pointer targets in initialization "
 					"differ in signedness"),
-				     N_("pointer targets in return differ "
+				     G_("pointer targets in return differ "
 					"in signedness"));
 	    }
 	  else if (TREE_CODE (ttl) == FUNCTION_TYPE
@@ -3846,24 +3846,24 @@ convert_for_assignment (tree type, tree 
 		 it is okay to use a const or volatile function
 		 where an ordinary one is wanted, but not vice-versa.  */
 	      if (TYPE_QUALS (ttl) & ~TYPE_QUALS (ttr))
-		WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE makes "
+		WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE makes "
 					"qualified function pointer "
 					"from unqualified"),
-				     N_("assignment makes qualified function "
+				     G_("assignment makes qualified function "
 					"pointer from unqualified"),
-				     N_("initialization makes qualified "
+				     G_("initialization makes qualified "
 					"function pointer from unqualified"),
-				     N_("return makes qualified function "
+				     G_("return makes qualified function "
 					"pointer from unqualified"));
 	    }
 	}
       else
-	WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE from "
+	WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE from "
 				"incompatible pointer type"),
-			     N_("assignment from incompatible pointer type"),
-			     N_("initialization from incompatible "
+			     G_("assignment from incompatible pointer type"),
+			     G_("initialization from incompatible "
 				"pointer type"),
-			     N_("return from incompatible pointer type"));
+			     G_("return from incompatible pointer type"));
       return convert (type, rhs);
     }
   else if (codel == POINTER_TYPE && coder == ARRAY_TYPE)
@@ -3884,26 +3884,26 @@ convert_for_assignment (tree type, tree 
 	    && TREE_CODE (TREE_TYPE (rhs)) == INTEGER_TYPE
 	    && TREE_CODE (TREE_OPERAND (rhs, 0)) == INTEGER_CST
 	    && integer_zerop (TREE_OPERAND (rhs, 0))))
-	WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE makes "
+	WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE makes "
 				"pointer from integer without a cast"),
-			     N_("assignment makes pointer from integer "
+			     G_("assignment makes pointer from integer "
 				"without a cast"),
-			     N_("initialization makes pointer from "
+			     G_("initialization makes pointer from "
 				"integer without a cast"),
-			     N_("return makes pointer from integer "
+			     G_("return makes pointer from integer "
 				"without a cast"));
 
       return convert (type, rhs);
     }
   else if (codel == INTEGER_TYPE && coder == POINTER_TYPE)
     {
-      WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE makes integer "
+      WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE makes integer "
 			      "from pointer without a cast"),
-			   N_("assignment makes integer from pointer "
+			   G_("assignment makes integer from pointer "
 			      "without a cast"),
-			   N_("initialization makes integer from pointer "
+			   G_("initialization makes integer from pointer "
 			      "without a cast"),
-			   N_("return makes integer from pointer "
+			   G_("return makes integer from pointer "
 			      "without a cast"));
       return convert (type, rhs);
     }
--- gcc/c-errors.c.jj	2003-07-29 17:02:29.000000000 +0200
+++ gcc/c-errors.c	2005-05-31 15:07:32.000000000 +0200
@@ -32,13 +32,13 @@ Software Foundation, 59 Temple Place - S
 /* Issue an ISO C99 pedantic warning MSGID.  */
 
 void
-pedwarn_c99 (const char *msgid, ...)
+pedwarn_c99 (const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
   
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location,
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location,
                        flag_isoc99 ? pedantic_error_kind () : DK_WARNING);
   report_diagnostic (&diagnostic);
   va_end (ap);
@@ -50,13 +50,13 @@ pedwarn_c99 (const char *msgid, ...)
    (There is no flag_c90.)  */
 
 void
-pedwarn_c90 (const char *msgid, ...)
+pedwarn_c90 (const char *gmsgid, ...)
 {
   diagnostic_info diagnostic;
   va_list ap;
 
-  va_start (ap, msgid);
-  diagnostic_set_info (&diagnostic, msgid, &ap, input_location,
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location,
                        flag_isoc99 ? DK_WARNING : pedantic_error_kind ());
   report_diagnostic (&diagnostic);
   va_end (ap);
--- gcc/c-common.c.jj	2005-05-19 09:31:09.000000000 +0200
+++ gcc/c-common.c	2005-05-31 14:28:49.000000000 +0200
@@ -5513,51 +5513,51 @@ catenate_strings (const char *lhs, const
   return result;
 }
 
-/* Issue the error given by MSGID, indicating that it occurred before
+/* Issue the error given by GMSGID, indicating that it occurred before
    TOKEN, which had the associated VALUE.  */
 
 void
-c_parse_error (const char *msgid, enum cpp_ttype token, tree value)
+c_parse_error (const char *gmsgid, enum cpp_ttype token, tree value)
 {
 #define catenate_messages(M1, M2) catenate_strings ((M1), (M2), sizeof (M2))
 
   char *message = NULL;
 
   if (token == CPP_EOF)
-    message = catenate_messages (msgid, " at end of input");
+    message = catenate_messages (gmsgid, " at end of input");
   else if (token == CPP_CHAR || token == CPP_WCHAR)
     {
       unsigned int val = TREE_INT_CST_LOW (value);
       const char *const ell = (token == CPP_CHAR) ? "" : "L";
       if (val <= UCHAR_MAX && ISGRAPH (val))
-        message = catenate_messages (msgid, " before %s'%c'");
+        message = catenate_messages (gmsgid, " before %s'%c'");
       else
-        message = catenate_messages (msgid, " before %s'\\x%x'");
+        message = catenate_messages (gmsgid, " before %s'\\x%x'");
 
       error (message, ell, val);
       free (message);
       message = NULL;
     }
   else if (token == CPP_STRING || token == CPP_WSTRING)
-    message = catenate_messages (msgid, " before string constant");
+    message = catenate_messages (gmsgid, " before string constant");
   else if (token == CPP_NUMBER)
-    message = catenate_messages (msgid, " before numeric constant");
+    message = catenate_messages (gmsgid, " before numeric constant");
   else if (token == CPP_NAME)
     {
-      message = catenate_messages (msgid, " before %qE");
+      message = catenate_messages (gmsgid, " before %qE");
       error (message, value);
       free (message);
       message = NULL;
     }
   else if (token < N_TTYPES)
     {
-      message = catenate_messages (msgid, " before %qs token");
+      message = catenate_messages (gmsgid, " before %qs token");
       error (message, cpp_type2name (token));
       free (message);
       message = NULL;
     }
   else
-    error (msgid);
+    error (gmsgid);
 
   if (message)
     {
--- gcc/tree-inline.c.jj	2005-05-19 09:31:17.000000000 +0200
+++ gcc/tree-inline.c	2005-06-01 13:16:19.000000000 +0200
@@ -1286,7 +1286,7 @@ inline_forbidden_p_1 (tree *nodep, int *
 	  && !lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)))
 	{
 	  inline_forbidden_reason
-	    = N_("%Jfunction %qF can never be inlined because it uses "
+	    = G_("%Jfunction %qF can never be inlined because it uses "
 		 "alloca (override using the always_inline attribute)");
 	  return node;
 	}
@@ -1298,7 +1298,7 @@ inline_forbidden_p_1 (tree *nodep, int *
       if (setjmp_call_p (t))
 	{
 	  inline_forbidden_reason
-	    = N_("%Jfunction %qF can never be inlined because it uses setjmp");
+	    = G_("%Jfunction %qF can never be inlined because it uses setjmp");
 	  return node;
 	}
 
@@ -1312,7 +1312,7 @@ inline_forbidden_p_1 (tree *nodep, int *
 	  case BUILT_IN_NEXT_ARG:
 	  case BUILT_IN_VA_END:
 	    inline_forbidden_reason
-	      = N_("%Jfunction %qF can never be inlined because it "
+	      = G_("%Jfunction %qF can never be inlined because it "
 		   "uses variable argument lists");
 	    return node;
 
@@ -1323,14 +1323,14 @@ inline_forbidden_p_1 (tree *nodep, int *
 	       function calling __builtin_longjmp to be inlined into the
 	       function calling __builtin_setjmp, Things will Go Awry.  */
 	    inline_forbidden_reason
-	      = N_("%Jfunction %qF can never be inlined because "
+	      = G_("%Jfunction %qF can never be inlined because "
 		   "it uses setjmp-longjmp exception handling");
 	    return node;
 
 	  case BUILT_IN_NONLOCAL_GOTO:
 	    /* Similarly.  */
 	    inline_forbidden_reason
-	      = N_("%Jfunction %qF can never be inlined because "
+	      = G_("%Jfunction %qF can never be inlined because "
 		   "it uses non-local goto");
 	    return node;
 
@@ -1341,7 +1341,7 @@ inline_forbidden_p_1 (tree *nodep, int *
 	       been inlined into.  Similarly __builtin_return would
 	       return from the function the inline has been inlined into.  */
 	    inline_forbidden_reason
-	      = N_("%Jfunction %qF can never be inlined because "
+	      = G_("%Jfunction %qF can never be inlined because "
 		   "it uses __builtin_return or __builtin_apply_args");
 	    return node;
 
@@ -1360,7 +1360,7 @@ inline_forbidden_p_1 (tree *nodep, int *
       if (TREE_CODE (t) != LABEL_DECL)
 	{
 	  inline_forbidden_reason
-	    = N_("%Jfunction %qF can never be inlined "
+	    = G_("%Jfunction %qF can never be inlined "
 		 "because it contains a computed goto");
 	  return node;
 	}
@@ -1374,7 +1374,7 @@ inline_forbidden_p_1 (tree *nodep, int *
 	     because we cannot remap the destination label used in the
 	     function that is performing the non-local goto.  */
 	  inline_forbidden_reason
-	    = N_("%Jfunction %qF can never be inlined "
+	    = G_("%Jfunction %qF can never be inlined "
 		 "because it receives a non-local goto");
 	  return node;
 	}
@@ -1399,7 +1399,7 @@ inline_forbidden_p_1 (tree *nodep, int *
 	if (variably_modified_type_p (TREE_TYPE (t), NULL))
 	  {
 	    inline_forbidden_reason
-	      = N_("%Jfunction %qF can never be inlined "
+	      = G_("%Jfunction %qF can never be inlined "
 		   "because it uses variable sized variables");
 	    return node;
 	  }
--- gcc/final.c.jj	2005-04-29 09:17:56.000000000 +0200
+++ gcc/final.c	2005-05-31 22:58:45.000000000 +0200
@@ -2753,17 +2753,17 @@ alter_cond (rtx cond)
    In an `asm', it's the user's fault; otherwise, the compiler's fault.  */
 
 void
-output_operand_lossage (const char *msgid, ...)
+output_operand_lossage (const char *cmsgid, ...)
 {
   char *fmt_string;
   char *new_message;
   const char *pfx_str;
   va_list ap;
 
-  va_start (ap, msgid);
+  va_start (ap, cmsgid);
 
   pfx_str = this_is_asm_operands ? _("invalid 'asm': ") : "output_operand: ";
-  asprintf (&fmt_string, "%s%s", pfx_str, _(msgid));
+  asprintf (&fmt_string, "%s%s", pfx_str, _(cmsgid));
   vasprintf (&new_message, fmt_string, ap);
 
   if (this_is_asm_operands)


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]