aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-06-06 21:31:40 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2005-06-06 21:31:40 +0200
commit4b794eaf73ef8df7689d1e9de146e00398f2d1fd (patch)
treec8a8fb885e6d7542f092ff09cfbce8b498ccf63e /gcc/cp
parent6be74c4f5c988270ef3e4d4664a15b2b2e205f9a (diff)
downloadgcc-4b794eaf73ef8df7689d1e9de146e00398f2d1fd.zip
gcc-4b794eaf73ef8df7689d1e9de146e00398f2d1fd.tar.gz
gcc-4b794eaf73ef8df7689d1e9de146e00398f2d1fd.tar.bz2
exgettext: Handle gmsgid and cmsgid arguments specially, as gcc-internal-format and c-format.
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. From-SVN: r100676
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/error.c36
2 files changed, 24 insertions, 18 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e493e10..cbfe764 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-06 Jakub Jelinek <jakub@redhat.com>
+
+ * error.c (locate_error): Use gmsgid instead of msgid for argument
+ name.
+ (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
+
2005-06-06 Nathan Sidwell <nathan@codesourcery.com>
PR 21903
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 8eab229..71b7173 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2319,13 +2319,13 @@ cp_printer (pretty_printer *pp, text_info *text)
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 == '%')
@@ -2381,57 +2381,57 @@ locate_error (const char *msgid, va_list ap)
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);