diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-02 15:49:20 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-02 15:49:20 +0000 |
commit | 5c892d4a05f59896e924a64c2db11630ada5c263 (patch) | |
tree | eb09280053de717f24d7f3580c21560495b034ce /gcc/cp/rtti.c | |
parent | 1004aacef449fbfff6c2fdb6f2ec9e7c897b3e08 (diff) | |
download | gcc-5c892d4a05f59896e924a64c2db11630ada5c263.tar.gz |
2009-12-02 Paolo Bonzini <bonzini@gnu.org>
Shujing Zhao <pearly.zhao@oracle.com>
PR c++/29917
* call.c (op_error): Accept a boolean to indicate no match/ambiguous
match, instead of a string. Callers adjusted.
PR c++/34836
* cp-tree.h (readonly_error_kind): New type.
(readonly_error): Adjust prototype with new argument.
* typeck2.c (readonly_error): Accept readonly_error_kind as argument
and add macro ERROR_FOR_ASSIGNMENT to emit diagnostics.
* semantics.c (finish_asm_stmt): Adjust readonly_error call.
* typeck.c (cp_build_unary_op, cp_build_modify_expr): Likewise.
* decl.c (grokparms, grok_op_properties): Put the diagnostics in full
sentences for easy translation and wrap the diagnostics into G_() when
needed.
(create_array_type_for_decl): Likewise.
* pt.c (tsubst): Likewise.
* typeck2.c (cp_build_unary_op): Wrap diagnostic into _().
* rtti.c (build_dynamic_cast_1): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154915 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r-- | gcc/cp/rtti.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index 383c96c7949..7378f89fd1a 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "intl.h" #include "coretypes.h" #include "tm.h" #include "tree.h" @@ -525,18 +526,18 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) case REFERENCE_TYPE: if (! MAYBE_CLASS_TYPE_P (TREE_TYPE (type))) { - errstr = "target is not pointer or reference to class"; + errstr = _("target is not pointer or reference to class"); goto fail; } if (!COMPLETE_TYPE_P (complete_type (TREE_TYPE (type)))) { - errstr = "target is not pointer or reference to complete type"; + errstr = _("target is not pointer or reference to complete type"); goto fail; } break; default: - errstr = "target is not pointer or reference"; + errstr = _("target is not pointer or reference"); goto fail; } @@ -547,17 +548,17 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) if (TREE_CODE (exprtype) != POINTER_TYPE) { - errstr = "source is not a pointer"; + errstr = _("source is not a pointer"); goto fail; } if (! MAYBE_CLASS_TYPE_P (TREE_TYPE (exprtype))) { - errstr = "source is not a pointer to class"; + errstr = _("source is not a pointer to class"); goto fail; } if (!COMPLETE_TYPE_P (complete_type (TREE_TYPE (exprtype)))) { - errstr = "source is a pointer to incomplete type"; + errstr = _("source is a pointer to incomplete type"); goto fail; } } @@ -570,12 +571,12 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) if (! MAYBE_CLASS_TYPE_P (TREE_TYPE (exprtype))) { - errstr = "source is not of class type"; + errstr = _("source is not of class type"); goto fail; } if (!COMPLETE_TYPE_P (complete_type (TREE_TYPE (exprtype)))) { - errstr = "source is of incomplete class type"; + errstr = _("source is of incomplete class type"); goto fail; } @@ -588,7 +589,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) if (!at_least_as_qualified_p (TREE_TYPE (type), TREE_TYPE (exprtype))) { - errstr = "conversion casts away constness"; + errstr = _("conversion casts away constness"); goto fail; } @@ -748,7 +749,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) } } else - errstr = "source type is not polymorphic"; + errstr = _("source type is not polymorphic"); fail: if (complain & tf_error) |