aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.h
diff options
context:
space:
mode:
authorShujing Zhao <pearly.zhao@oracle.com>2009-12-17 03:22:22 +0000
committerShujing Zhao <pzhao@gcc.gnu.org>2009-12-17 03:22:22 +0000
commitdd865ef6e85afae532e83f05cf3126a23cb81ba5 (patch)
tree27ca1fe8f71a3b516fc9e49ec49456f83326e58c /gcc/c-common.h
parent3d34d0a029039f01426edee77b5bad8815304c2a (diff)
downloadgcc-dd865ef6e85afae532e83f05cf3126a23cb81ba5.zip
gcc-dd865ef6e85afae532e83f05cf3126a23cb81ba5.tar.gz
gcc-dd865ef6e85afae532e83f05cf3126a23cb81ba5.tar.bz2
re PR c/40885 (build_indirect_ref i18n problems)
2009-12-17 Shujing Zhao <pearly.zhao@oracle.com> PR c/40885 * c-common.h (ref_operator): New type. (build_indirect_ref): Adjust prototype with new argument. * c-typeck.c (build_indirect_ref): Accept ref_operator as argument and emit the diagnostics for easy translation. (build_array_ref): Update calls to build_indirect_ref. * c-omp.c (c_finish_omp_atomic): Likewise. * c-parser.c (c_parser_unary_expression, c_parser_postfix_expression_after_primary): Likewise. cp/ 2009-12-17 Shujing Zhao <pearly.zhao@oracle.com> * typeck.c (build_indirect_ref): Update the argument. (build_x_indirect_ref): Likewise. (cp_build_indirect_ref): Update the argument and emit the diagnostics for easy translation. (build_class_member_access_expr, build_array_ref, get_member_function_from_ptrfunc): Update calls. * cp-tree.h (build_x_indirect_ref, cp_build_indirect_ref): Update prototypes. * call.c (build_new_op, convert_like_real, build_x_va_arg, build_over_call): Update calls. * class.c (build_base_path, build_simple_base_path, build_vfn_ref): Likewise. * decl.c (start_preparsed_function): Likewise. * except.c (expand_start_catch_block, build_throw): Likewise. * init.c (emit_mem_initializers, expand_virtual_init, expand_virtual_init, build_new_1, build_vec_init, build_delete, build_vec_delete): Likewise. * parser.c (cp_parser_unary_expression): Likewise. * pt.c (tsubst_copy_and_build): Likewise. * rtti.c (build_headof, get_tinfo_decl_dynamic, get_typeid): Likewise. * semantics.c (finish_non_static_data_member, thisify_lambda_field): Likewise. * tree.c (build_dummy_object, stabilize_expr): Likewise. * typeck2.c (build_x_arrow): Likewise. testsuite/ 2009-12-17 Shujing Zhao <pearly.zhao@oracle.com> * g++.old-deja/g++.mike/net31.C: Make expected dg-error strings explicit. * g++.old-deja/g++.bugs/900213_02.C: Likewise. * g++.old-deja/g++.bugs/900215_02.C: Likewise. From-SVN: r155302
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r--gcc/c-common.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 5830d7b..6f8d832 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -391,6 +391,20 @@ extern c_language_kind c_language;
#define c_dialect_cxx() ((c_language & clk_cxx) != 0)
#define c_dialect_objc() ((c_language & clk_objc) != 0)
+/* The various name of operator that appears in error messages. */
+typedef enum ref_operator {
+ /* NULL */
+ RO_NULL,
+ /* array indexing */
+ RO_ARRAY_INDEXING,
+ /* unary * */
+ RO_UNARY_STAR,
+ /* -> */
+ RO_ARROW,
+ /* implicit conversion */
+ RO_IMPLICIT_CONVERSION
+} ref_operator;
+
/* Information about a statement tree. */
struct GTY(()) stmt_tree_s {
@@ -448,7 +462,7 @@ extern tree pushdecl_top_level (tree);
extern tree pushdecl (tree);
extern tree build_modify_expr (location_t, tree, tree, enum tree_code,
location_t, tree, tree);
-extern tree build_indirect_ref (location_t, tree, const char *);
+extern tree build_indirect_ref (location_t, tree, ref_operator);
extern int c_expand_decl (tree);