X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fc-common.h;h=6ed38490cb6132cdd1a77928a3e2c6fbe4b8e1f2;hb=4db0fbe2dceb8cd1c27595831571f6927411aaab;hp=ec5705e6ed8f3e135c42f50b60412f9d3be25a05;hpb=c1c67b4f5041c4367842002c81ffe912ff97f2d8;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/c-common.h b/gcc/c-common.h index ec5705e6ed8..6ed38490cb6 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -114,7 +114,7 @@ enum rid RID_IS_UNION, /* C++0x */ - RID_STATIC_ASSERT, RID_DECLTYPE, + RID_STATIC_ASSERT, RID_CONSTEXPR, RID_DECLTYPE, /* Objective-C */ RID_AT_ENCODE, RID_AT_END, @@ -126,6 +126,30 @@ enum rid RID_AT_INTERFACE, RID_AT_IMPLEMENTATION, + /* Named address support, mapping the keyword to a particular named address + number. Named address space 0 is reserved for the generic address. If + there are more than 254 named addresses, the addr_space_t type will need + to be grown from an unsigned char to unsigned short. */ + RID_ADDR_SPACE_0, /* generic address */ + RID_ADDR_SPACE_1, + RID_ADDR_SPACE_2, + RID_ADDR_SPACE_3, + RID_ADDR_SPACE_4, + RID_ADDR_SPACE_5, + RID_ADDR_SPACE_6, + RID_ADDR_SPACE_7, + RID_ADDR_SPACE_8, + RID_ADDR_SPACE_9, + RID_ADDR_SPACE_10, + RID_ADDR_SPACE_11, + RID_ADDR_SPACE_12, + RID_ADDR_SPACE_13, + RID_ADDR_SPACE_14, + RID_ADDR_SPACE_15, + + RID_FIRST_ADDR_SPACE = RID_ADDR_SPACE_0, + RID_LAST_ADDR_SPACE = RID_ADDR_SPACE_15, + RID_MAX, RID_FIRST_MODIFIER = RID_STATIC, @@ -263,6 +287,10 @@ struct c_common_resword #define D_CXX_OBJC 0x100 /* In Objective C, and C++, but not C. */ #define D_CXXWARN 0x200 /* In C warn with -Wcxx-compat. */ +/* Macro for backends to define named address keywords. */ +#define ADDR_SPACE_KEYWORD(STRING, VALUE) \ + { STRING, RID_FIRST_ADDR_SPACE + (VALUE), D_CONLY | D_EXT } + /* The reserved keyword table. */ extern const struct c_common_resword c_common_reswords[]; @@ -360,8 +388,22 @@ c_language_kind; front end. For "ObjC features" or "not C++" use the macros. */ extern c_language_kind c_language; -#define c_dialect_cxx() (c_language & clk_cxx) -#define c_dialect_objc() (c_language & clk_objc) +#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. */ @@ -420,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); @@ -760,6 +802,7 @@ extern const struct attribute_spec c_common_format_attribute_table[]; extern tree (*make_fname_decl) (location_t, tree, int); +extern const char *c_addr_space_name (addr_space_t as); extern tree identifier_global_value (tree); extern void record_builtin_type (enum rid, const char *, tree); extern tree build_void_list_node (void); @@ -779,6 +822,7 @@ extern void check_function_format (tree, int, tree *); extern void set_Wformat (int); extern tree handle_format_attribute (tree *, tree, tree, int, bool *); extern tree handle_format_arg_attribute (tree *, tree, tree, int, bool *); +extern bool attribute_takes_identifier_p (tree); extern int c_common_handle_option (size_t code, const char *arg, int value); extern bool c_common_missing_argument (const char *opt, size_t code); extern tree c_common_type_for_mode (enum machine_mode, int); @@ -792,6 +836,7 @@ extern tree c_build_bitfield_integer_type (unsigned HOST_WIDE_INT, int); extern bool decl_with_nonnull_addr_p (const_tree); extern tree c_fully_fold (tree, bool, bool *); extern tree decl_constant_value_for_optimization (tree); +extern tree c_wrap_maybe_const (tree, bool); extern tree c_save_expr (tree); extern tree c_common_truthvalue_conversion (location_t, tree); extern void c_apply_type_quals_to_decl (int, tree); @@ -830,7 +875,7 @@ extern tree shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwis and, if so, perhaps change them both back to their original type. */ extern tree shorten_compare (tree *, tree *, tree *, enum tree_code *); -extern tree pointer_int_sum (enum tree_code, tree, tree); +extern tree pointer_int_sum (location_t, enum tree_code, tree, tree); /* Add qualifiers to a type, in the fashion for C. */ extern tree c_build_qualified_type (tree, int); @@ -839,8 +884,6 @@ extern tree c_build_qualified_type (tree, int); frontends. */ extern void c_common_nodes_and_builtins (void); -extern void set_builtin_user_assembler_name (tree decl, const char *asmspec); - extern void disable_builtin_function (const char *); extern void set_compound_literal_name (tree decl); @@ -982,8 +1025,6 @@ extern void dump_time_statistics (void); extern bool c_dump_tree (void *, tree); -extern void c_warn_unused_result (gimple_seq); - extern void verify_sequence_points (tree); extern tree fold_offsetof (tree, tree); @@ -1012,9 +1053,9 @@ extern void warn_about_parentheses (enum tree_code, extern void warn_for_unused_label (tree label); extern void warn_for_div_by_zero (location_t, tree divisor); extern void warn_for_sign_compare (location_t, - tree orig_op0, tree orig_op1, - tree op0, tree op1, - tree result_type, + tree orig_op0, tree orig_op1, + tree op0, tree op1, + tree result_type, enum tree_code resultcode); extern void set_underlying_type (tree x); extern bool is_typedef_decl (tree x); @@ -1132,6 +1173,7 @@ extern enum omp_clause_default_kind c_omp_predetermined_sharing (tree); /* Not in c-omp.c; provided by the front end. */ extern bool c_omp_sharing_predetermined (tree); extern tree c_omp_remap_decl (tree, bool); +extern void record_types_used_by_current_var_decl (tree); /* In order for the format checking to accept the C frontend diagnostic framework extensions, you must include this file before