summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-06 19:31:40 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-06 19:31:40 +0000
commit380c66974cee2bb4a5281c8c11f3632bb21118e5 (patch)
treec8a8fb885e6d7542f092ff09cfbce8b498ccf63e /gcc/diagnostic.c
parentb74b821630d81d06cd6f46c510e81a52f6869943 (diff)
downloadgcc-380c66974cee2bb4a5281c8c11f3632bb21118e5.tar.gz
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. Fail if xgettext is not 0.14.5 or later. 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. * ABOUT-GCC-NLS: Require gettext 0.14.5 or later. Mention the new conventions for marking translations. * doc/install.texi: Mention gettext 0.14.5 or later requirement. 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. * java-tree.h (parse_error_context): Likewise. * parse.y (parse_error_context, parse_warning_context, issue_warning_error_from_context): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100676 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index e48133299af..35bce25d97f 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -113,13 +113,13 @@ diagnostic_initialize (diagnostic_context *context)
}
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);
pp_format_verbatim (global_dc->printer, &text);
pp_flush (global_dc->printer);
va_end (ap);
@@ -413,13 +413,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);
}
@@ -427,13 +427,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);
@@ -441,13 +441,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);
}
@@ -461,13 +461,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);
@@ -476,13 +476,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);
}
@@ -491,13 +491,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);
}
@@ -506,13 +506,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);
@@ -524,13 +524,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);
@@ -543,12 +543,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);
}