{ "__is_standard_layout", RID_IS_STD_LAYOUT, D_CXXONLY },
{ "__is_trivial", RID_IS_TRIVIAL, D_CXXONLY },
{ "__is_union", RID_IS_UNION, D_CXXONLY },
+ { "__is_literal_type", RID_IS_LITERAL_TYPE, D_CXXONLY },
{ "__imag", RID_IMAGPART, 0 },
{ "__imag__", RID_IMAGPART, 0 },
{ "__inline", RID_INLINE, 0 },
{ "synchronized", RID_AT_SYNCHRONIZED, D_OBJC },
{ "optional", RID_AT_OPTIONAL, D_OBJC },
{ "required", RID_AT_REQUIRED, D_OBJC },
+ { "property", RID_AT_PROPERTY, D_OBJC },
+ { "package", RID_AT_PACKAGE, D_OBJC },
+ { "synthesize", RID_AT_SYNTHESIZE, D_OBJC },
+ { "dynamic", RID_AT_DYNAMIC, D_OBJC },
/* These are recognized only in protocol-qualifier context
(see above) */
{ "bycopy", RID_BYCOPY, D_OBJC },
{ "inout", RID_INOUT, D_OBJC },
{ "oneway", RID_ONEWAY, D_OBJC },
{ "out", RID_OUT, D_OBJC },
+ /* These are recognized inside a property attribute list */
+ { "assign", RID_ASSIGN, D_OBJC },
+ { "copy", RID_COPY, D_OBJC },
+ { "getter", RID_GETTER, D_OBJC },
+ { "nonatomic", RID_NONATOMIC, D_OBJC },
+ { "readonly", RID_READONLY, D_OBJC },
+ { "readwrite", RID_READWRITE, D_OBJC },
+ { "retain", RID_RETAIN, D_OBJC },
+ { "setter", RID_SETTER, D_OBJC },
};
const unsigned int num_c_common_reswords =
int i;
const int expr_num_operands = TREE_OPERAND_LENGTH (expr);
tree expr_type = TREE_TYPE (expr);
- location_t loc = EXPR_HAS_LOCATION (expr)
- ? EXPR_LOCATION (expr) : input_location;
+ location_t loc = EXPR_LOC_OR_HERE (expr);
if (!warn_conversion && !warn_sign_conversion)
return;
&& (!only_writes || list->writer))
{
warned_ids = new_tlist (warned_ids, written, NULL_TREE);
- warning_at (EXPR_HAS_LOCATION (writer)
- ? EXPR_LOCATION (writer) : input_location,
+ warning_at (EXPR_LOC_OR_HERE (writer),
OPT_Wsequence_point, "operation on %qE may be undefined",
list->expr);
}
if (value == NULL_TREE)
return value;
- /* ??? Can we ever get nops here for a valid case value? We
- shouldn't for C. */
- STRIP_TYPE_NOPS (value);
- /* In C++, the following is allowed:
-
- const int i = 3;
- switch (...) { case i: ... }
-
- So, we try to reduce the VALUE to a constant that way. */
- if (c_dialect_cxx ())
- {
- value = decl_constant_value (value);
- STRIP_TYPE_NOPS (value);
- value = fold (value);
- }
-
if (TREE_CODE (value) == INTEGER_CST)
/* Promote char or short to int. */
value = perform_integral_promotions (value);
tree type = TREE_TYPE (*node);
/* See FIXME comment in c_common_attribute_table. */
- if (TREE_CODE (*node) == FUNCTION_DECL)
+ if (TREE_CODE (*node) == FUNCTION_DECL
+ || objc_method_decl (TREE_CODE (*node)))
TREE_THIS_VOLATILE (*node) = 1;
else if (TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
if (ALL_FIXED_POINT_MODE_P (mode)
&& TYPE_UNSIGNED (type) != UNSIGNED_FIXED_POINT_MODE_P (mode))
{
- error ("signness of type and machine mode %qs don't match", p);
+ error ("signedness of type and machine mode %qs don%'t match", p);
return NULL_TREE;
}
/* For fixed-point modes, we need to pass saturating info. */
&decoded_options,
&decoded_options_count);
decode_options (&global_options, &global_options_set,
- decoded_options, decoded_options_count);
+ decoded_options, decoded_options_count, global_dc);
targetm.override_options_after_change();
return failure;
}
+/* Like c_mark_addressable but don't check register qualifier. */
+void
+c_common_mark_addressable_vec (tree t)
+{
+ while (handled_component_p (t))
+ t = TREE_OPERAND (t, 0);
+ if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL)
+ return;
+ TREE_ADDRESSABLE (t) = 1;
+}
+
+
\f
/* Used to help initialize the builtin-types.def table. When a type of
the correct size doesn't exist, use error_mark_node instead of NULL.