===================================================================
@@ -104,29 +104,42 @@ static tree fake_attribute_handler
this minimal set of attributes to accommodate the needs of builtins. */
const struct attribute_spec gnat_internal_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "const", 0, 0, true, false, false, handle_const_attribute },
- { "nothrow", 0, 0, true, false, false, handle_nothrow_attribute },
- { "pure", 0, 0, true, false, false, handle_pure_attribute },
- { "no vops", 0, 0, true, false, false, handle_novops_attribute },
- { "nonnull", 0, -1, false, true, true, handle_nonnull_attribute },
- { "sentinel", 0, 1, false, true, true, handle_sentinel_attribute },
- { "noreturn", 0, 0, true, false, false, handle_noreturn_attribute },
- { "leaf", 0, 0, true, false, false, handle_leaf_attribute },
- { "malloc", 0, 0, true, false, false, handle_malloc_attribute },
- { "type generic", 0, 0, false, true, true, handle_type_generic_attribute },
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "const", 0, 0, true, false, false, handle_const_attribute,
+ false },
+ { "nothrow", 0, 0, true, false, false, handle_nothrow_attribute,
+ false },
+ { "pure", 0, 0, true, false, false, handle_pure_attribute,
+ false },
+ { "no vops", 0, 0, true, false, false, handle_novops_attribute,
+ false },
+ { "nonnull", 0, -1, false, true, true, handle_nonnull_attribute,
+ false },
+ { "sentinel", 0, 1, false, true, true, handle_sentinel_attribute,
+ false },
+ { "noreturn", 0, 0, true, false, false, handle_noreturn_attribute,
+ false },
+ { "leaf", 0, 0, true, false, false, handle_leaf_attribute,
+ false },
+ { "malloc", 0, 0, true, false, false, handle_malloc_attribute,
+ false },
+ { "type generic", 0, 0, false, true, true, handle_type_generic_attribute,
+ false },
- { "vector_size", 1, 1, false, true, false, handle_vector_size_attribute },
- { "vector_type", 0, 0, false, true, false, handle_vector_type_attribute },
- { "may_alias", 0, 0, false, true, false, NULL },
+ { "vector_size", 1, 1, false, true, false, handle_vector_size_attribute,
+ false },
+ { "vector_type", 0, 0, false, true, false, handle_vector_type_attribute,
+ false },
+ { "may_alias", 0, 0, false, true, false, NULL, false },
/* ??? format and format_arg are heavy and not supported, which actually
prevents support for stdio builtins, which we however declare as part
of the common builtins.def contents. */
- { "format", 3, 3, false, true, true, fake_attribute_handler },
- { "format_arg", 1, 1, false, true, true, fake_attribute_handler },
+ { "format", 3, 3, false, true, true, fake_attribute_handler, false },
+ { "format_arg", 1, 1, false, true, true, fake_attribute_handler, false },
- { NULL, 0, 0, false, false, false, NULL }
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Associates a GNAT tree node to a GCC tree node. It is used in
===================================================================
@@ -57,7 +57,7 @@ static bool attributes_initialized = fal
static const struct attribute_spec empty_attribute_table[] =
{
- { NULL, 0, 0, false, false, false, NULL }
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Return base name of the attribute. Ie '__attr__' is turned into 'attr'.
===================================================================
@@ -585,123 +585,125 @@ const unsigned int num_c_common_reswords
/* Table of machine-independent attributes common to all C-like languages. */
const struct attribute_spec c_common_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
{ "packed", 0, 0, false, false, false,
- handle_packed_attribute },
+ handle_packed_attribute , false},
{ "nocommon", 0, 0, true, false, false,
- handle_nocommon_attribute },
+ handle_nocommon_attribute, false},
{ "common", 0, 0, true, false, false,
- handle_common_attribute },
+ handle_common_attribute, false },
/* FIXME: logically, noreturn attributes should be listed as
"false, true, true" and apply to function types. But implementing this
would require all the places in the compiler that use TREE_THIS_VOLATILE
on a decl to identify non-returning functions to be located and fixed
to check the function type instead. */
{ "noreturn", 0, 0, true, false, false,
- handle_noreturn_attribute },
+ handle_noreturn_attribute, false },
{ "volatile", 0, 0, true, false, false,
- handle_noreturn_attribute },
+ handle_noreturn_attribute, false },
{ "noinline", 0, 0, true, false, false,
- handle_noinline_attribute },
+ handle_noinline_attribute, false },
{ "noclone", 0, 0, true, false, false,
- handle_noclone_attribute },
+ handle_noclone_attribute, false },
{ "leaf", 0, 0, true, false, false,
- handle_leaf_attribute },
+ handle_leaf_attribute, false },
{ "always_inline", 0, 0, true, false, false,
- handle_always_inline_attribute },
+ handle_always_inline_attribute, false },
{ "gnu_inline", 0, 0, true, false, false,
- handle_gnu_inline_attribute },
+ handle_gnu_inline_attribute, false },
{ "artificial", 0, 0, true, false, false,
- handle_artificial_attribute },
+ handle_artificial_attribute, false },
{ "flatten", 0, 0, true, false, false,
- handle_flatten_attribute },
+ handle_flatten_attribute, false },
{ "used", 0, 0, true, false, false,
- handle_used_attribute },
+ handle_used_attribute, false },
{ "unused", 0, 0, false, false, false,
- handle_unused_attribute },
+ handle_unused_attribute, false },
{ "externally_visible", 0, 0, true, false, false,
- handle_externally_visible_attribute },
+ handle_externally_visible_attribute, false },
/* The same comments as for noreturn attributes apply to const ones. */
{ "const", 0, 0, true, false, false,
- handle_const_attribute },
+ handle_const_attribute, false },
{ "transparent_union", 0, 0, false, false, false,
- handle_transparent_union_attribute },
+ handle_transparent_union_attribute, false },
{ "constructor", 0, 1, true, false, false,
- handle_constructor_attribute },
+ handle_constructor_attribute, false },
{ "destructor", 0, 1, true, false, false,
- handle_destructor_attribute },
+ handle_destructor_attribute, false },
{ "mode", 1, 1, false, true, false,
- handle_mode_attribute },
+ handle_mode_attribute, false },
{ "section", 1, 1, true, false, false,
- handle_section_attribute },
+ handle_section_attribute, false },
{ "aligned", 0, 1, false, false, false,
- handle_aligned_attribute },
+ handle_aligned_attribute, false },
{ "weak", 0, 0, true, false, false,
- handle_weak_attribute },
+ handle_weak_attribute, false },
{ "ifunc", 1, 1, true, false, false,
- handle_ifunc_attribute },
+ handle_ifunc_attribute, false },
{ "alias", 1, 1, true, false, false,
- handle_alias_attribute },
+ handle_alias_attribute, false },
{ "weakref", 0, 1, true, false, false,
- handle_weakref_attribute },
+ handle_weakref_attribute, false },
{ "no_instrument_function", 0, 0, true, false, false,
- handle_no_instrument_function_attribute },
+ handle_no_instrument_function_attribute,
+ false },
{ "malloc", 0, 0, true, false, false,
- handle_malloc_attribute },
+ handle_malloc_attribute, false },
{ "returns_twice", 0, 0, true, false, false,
- handle_returns_twice_attribute },
+ handle_returns_twice_attribute, false },
{ "no_stack_limit", 0, 0, true, false, false,
- handle_no_limit_stack_attribute },
+ handle_no_limit_stack_attribute, false },
{ "pure", 0, 0, true, false, false,
- handle_pure_attribute },
+ handle_pure_attribute, false },
/* For internal use (marking of builtins) only. The name contains space
to prevent its usage in source code. */
{ "no vops", 0, 0, true, false, false,
- handle_novops_attribute },
+ handle_novops_attribute, false },
{ "deprecated", 0, 1, false, false, false,
- handle_deprecated_attribute },
+ handle_deprecated_attribute, false },
{ "vector_size", 1, 1, false, true, false,
- handle_vector_size_attribute },
+ handle_vector_size_attribute, false },
{ "visibility", 1, 1, false, false, false,
- handle_visibility_attribute },
+ handle_visibility_attribute, false },
{ "tls_model", 1, 1, true, false, false,
- handle_tls_model_attribute },
+ handle_tls_model_attribute, false },
{ "nonnull", 0, -1, false, true, true,
- handle_nonnull_attribute },
+ handle_nonnull_attribute, false },
{ "nothrow", 0, 0, true, false, false,
- handle_nothrow_attribute },
- { "may_alias", 0, 0, false, true, false, NULL },
+ handle_nothrow_attribute, false },
+ { "may_alias", 0, 0, false, true, false, NULL, false },
{ "cleanup", 1, 1, true, false, false,
- handle_cleanup_attribute },
+ handle_cleanup_attribute, false },
{ "warn_unused_result", 0, 0, false, true, true,
- handle_warn_unused_result_attribute },
+ handle_warn_unused_result_attribute, false },
{ "sentinel", 0, 1, false, true, true,
- handle_sentinel_attribute },
+ handle_sentinel_attribute, false },
/* For internal use (marking of builtins) only. The name contains space
to prevent its usage in source code. */
{ "type generic", 0, 0, false, true, true,
- handle_type_generic_attribute },
+ handle_type_generic_attribute, false },
{ "alloc_size", 1, 2, false, true, true,
- handle_alloc_size_attribute },
+ handle_alloc_size_attribute, false },
{ "cold", 0, 0, true, false, false,
- handle_cold_attribute },
+ handle_cold_attribute, false },
{ "hot", 0, 0, true, false, false,
- handle_hot_attribute },
+ handle_hot_attribute, false },
{ "warning", 1, 1, true, false, false,
- handle_error_attribute },
+ handle_error_attribute, false },
{ "error", 1, 1, true, false, false,
- handle_error_attribute },
+ handle_error_attribute, false },
{ "target", 1, -1, true, false, false,
- handle_target_attribute },
+ handle_target_attribute, false },
{ "optimize", 1, -1, true, false, false,
- handle_optimize_attribute },
+ handle_optimize_attribute, false },
{ "no_split_stack", 0, 0, true, false, false,
- handle_no_split_stack_attribute },
+ handle_no_split_stack_attribute, false },
/* For internal use (marking of builtins and runtime functions) only.
The name contains space to prevent its usage in source code. */
{ "fn spec", 1, 1, false, true, true,
- handle_fnspec_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ handle_fnspec_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Give the specifications for the format attributes, used by C and all
@@ -709,12 +711,13 @@ const struct attribute_spec c_common_att
const struct attribute_spec c_common_format_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
{ "format", 3, 3, false, true, true,
- handle_format_attribute },
+ handle_format_attribute, false },
{ "format_arg", 1, 1, false, true, true,
- handle_format_arg_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ handle_format_arg_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Return identifier for address space AS. */
===================================================================
@@ -7582,9 +7582,10 @@ common_object_handler (tree *node, tree
static const struct attribute_spec vms_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { COMMON_OBJECT, 0, 1, true, false, false, common_object_handler },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { COMMON_OBJECT, 0, 1, true, false, false, common_object_handler, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
void
===================================================================
@@ -107,9 +107,11 @@ static void arc_conditional_register_usa
static const struct attribute_spec arc_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt", 1, 1, true, false, false, arc_handle_interrupt_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "interrupt", 1, 1, true, false, false, arc_handle_interrupt_attribute,
+ false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Initialize the GCC target structure. */
===================================================================
@@ -255,20 +255,25 @@ static reg_class_t arm_preferred_rename_
/* Table of machine attributes. */
static const struct attribute_spec arm_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
/* Function calls made to this symbol must be done indirectly, because
it may lie outside of the 26 bit addressing range of a normal function
call. */
- { "long_call", 0, 0, false, true, true, NULL },
+ { "long_call", 0, 0, false, true, true, NULL, false },
/* Whereas these functions are always known to reside within the 26 bit
addressing range. */
- { "short_call", 0, 0, false, true, true, NULL },
+ { "short_call", 0, 0, false, true, true, NULL, false },
/* Specify the procedure call conventions for a function. */
- { "pcs", 1, 1, false, true, true, arm_handle_pcs_attribute },
+ { "pcs", 1, 1, false, true, true, arm_handle_pcs_attribute,
+ false },
/* Interrupt Service Routines have special prologue and epilogue requirements. */
- { "isr", 0, 1, false, false, false, arm_handle_isr_attribute },
- { "interrupt", 0, 1, false, false, false, arm_handle_isr_attribute },
- { "naked", 0, 0, true, false, false, arm_handle_fndecl_attribute },
+ { "isr", 0, 1, false, false, false, arm_handle_isr_attribute,
+ false },
+ { "interrupt", 0, 1, false, false, false, arm_handle_isr_attribute,
+ false },
+ { "naked", 0, 0, true, false, false, arm_handle_fndecl_attribute,
+ false },
#ifdef ARM_PE
/* ARM/PE has three new attributes:
interfacearm - ?
@@ -279,15 +284,17 @@ static const struct attribute_spec arm_a
them with spaces. We do NOT support this. Instead, use __declspec
multiple times.
*/
- { "dllimport", 0, 0, true, false, false, NULL },
- { "dllexport", 0, 0, true, false, false, NULL },
- { "interfacearm", 0, 0, true, false, false, arm_handle_fndecl_attribute },
+ { "dllimport", 0, 0, true, false, false, NULL, false },
+ { "dllexport", 0, 0, true, false, false, NULL, false },
+ { "interfacearm", 0, 0, true, false, false, arm_handle_fndecl_attribute,
+ false },
#elif TARGET_DLLIMPORT_DECL_ATTRIBUTES
- { "dllimport", 0, 0, false, false, false, handle_dll_attribute },
- { "dllexport", 0, 0, false, false, false, handle_dll_attribute },
- { "notshared", 0, 0, false, true, false, arm_handle_notshared_attribute },
+ { "dllimport", 0, 0, false, false, false, handle_dll_attribute, false },
+ { "dllexport", 0, 0, false, false, false, handle_dll_attribute, false },
+ { "notshared", 0, 0, false, true, false, arm_handle_notshared_attribute,
+ false },
#endif
- { NULL, 0, 0, false, false, false, NULL }
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Set default optimization options. */
===================================================================
@@ -123,14 +123,21 @@ section *progmem_section;
/* AVR attributes. */
static const struct attribute_spec avr_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "progmem", 0, 0, false, false, false, avr_handle_progmem_attribute },
- { "signal", 0, 0, true, false, false, avr_handle_fndecl_attribute },
- { "interrupt", 0, 0, true, false, false, avr_handle_fndecl_attribute },
- { "naked", 0, 0, false, true, true, avr_handle_fntype_attribute },
- { "OS_task", 0, 0, false, true, true, avr_handle_fntype_attribute },
- { "OS_main", 0, 0, false, true, true, avr_handle_fntype_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "progmem", 0, 0, false, false, false, avr_handle_progmem_attribute,
+ false },
+ { "signal", 0, 0, true, false, false, avr_handle_fndecl_attribute,
+ false },
+ { "interrupt", 0, 0, true, false, false, avr_handle_fndecl_attribute,
+ false },
+ { "naked", 0, 0, false, true, true, avr_handle_fntype_attribute,
+ false },
+ { "OS_task", 0, 0, false, true, true, avr_handle_fntype_attribute,
+ false },
+ { "OS_main", 0, 0, false, true, true, avr_handle_fntype_attribute,
+ false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
===================================================================
@@ -5765,21 +5765,30 @@ bfin_handle_l2_attribute (tree *node, tr
/* Table of valid machine attributes. */
static const struct attribute_spec bfin_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt_handler", 0, 0, false, true, true, handle_int_attribute },
- { "exception_handler", 0, 0, false, true, true, handle_int_attribute },
- { "nmi_handler", 0, 0, false, true, true, handle_int_attribute },
- { "nesting", 0, 0, false, true, true, NULL },
- { "kspisusp", 0, 0, false, true, true, NULL },
- { "saveall", 0, 0, false, true, true, NULL },
- { "longcall", 0, 0, false, true, true, bfin_handle_longcall_attribute },
- { "shortcall", 0, 0, false, true, true, bfin_handle_longcall_attribute },
- { "l1_text", 0, 0, true, false, false, bfin_handle_l1_text_attribute },
- { "l1_data", 0, 0, true, false, false, bfin_handle_l1_data_attribute },
- { "l1_data_A", 0, 0, true, false, false, bfin_handle_l1_data_attribute },
- { "l1_data_B", 0, 0, true, false, false, bfin_handle_l1_data_attribute },
- { "l2", 0, 0, true, false, false, bfin_handle_l2_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "interrupt_handler", 0, 0, false, true, true, handle_int_attribute,
+ false },
+ { "exception_handler", 0, 0, false, true, true, handle_int_attribute,
+ false },
+ { "nmi_handler", 0, 0, false, true, true, handle_int_attribute, false },
+ { "nesting", 0, 0, false, true, true, NULL, false },
+ { "kspisusp", 0, 0, false, true, true, NULL, false },
+ { "saveall", 0, 0, false, true, true, NULL, false },
+ { "longcall", 0, 0, false, true, true, bfin_handle_longcall_attribute,
+ false },
+ { "shortcall", 0, 0, false, true, true, bfin_handle_longcall_attribute,
+ false },
+ { "l1_text", 0, 0, true, false, false, bfin_handle_l1_text_attribute,
+ false },
+ { "l1_data", 0, 0, true, false, false, bfin_handle_l1_data_attribute,
+ false },
+ { "l1_data_A", 0, 0, true, false, false, bfin_handle_l1_data_attribute,
+ false },
+ { "l1_data_B", 0, 0, true, false, false, bfin_handle_l1_data_attribute,
+ false },
+ { "l2", 0, 0, true, false, false, bfin_handle_l2_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Implementation of TARGET_ASM_INTEGER. When using FD-PIC, we need to
===================================================================
@@ -183,8 +183,8 @@ static void crx_function_arg_advance (CU
static const struct attribute_spec crx_attribute_table[] = {
/* ISRs have special prologue and epilogue requirements. */
- {"interrupt", 0, 0, false, true, true, NULL},
- {NULL, 0, 0, false, false, false, NULL}
+ {"interrupt", 0, 0, false, true, true, NULL, false},
+ {NULL, 0, 0, false, false, false, NULL, false}
};
/* Option handling. */
===================================================================
@@ -717,11 +717,12 @@ extern GTY(()) section * darwin_sections
/* Extra attributes for Darwin. */
#define SUBTARGET_ATTRIBUTE_TABLE \
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ \
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, \
+ on_diagnostic } */ \
{ "apple_kext_compatibility", 0, 0, false, true, false, \
- darwin_handle_kext_attribute }, \
+ darwin_handle_kext_attribute, false }, \
{ "weak_import", 0, 0, true, false, false, \
- darwin_handle_weak_import_attribute }
+ darwin_handle_weak_import_attribute, false }
#undef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
===================================================================
@@ -5367,15 +5367,23 @@ h8300_insert_attributes (tree node, tree
static const struct attribute_spec h8300_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt_handler", 0, 0, true, false, false, h8300_handle_fndecl_attribute },
- { "saveall", 0, 0, true, false, false, h8300_handle_fndecl_attribute },
- { "OS_Task", 0, 0, true, false, false, h8300_handle_fndecl_attribute },
- { "monitor", 0, 0, true, false, false, h8300_handle_fndecl_attribute },
- { "function_vector", 0, 0, true, false, false, h8300_handle_fndecl_attribute },
- { "eightbit_data", 0, 0, true, false, false, h8300_handle_eightbit_data_attribute },
- { "tiny_data", 0, 0, true, false, false, h8300_handle_tiny_data_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "interrupt_handler", 0, 0, true, false, false,
+ h8300_handle_fndecl_attribute, false },
+ { "saveall", 0, 0, true, false, false,
+ h8300_handle_fndecl_attribute, false },
+ { "OS_Task", 0, 0, true, false, false,
+ h8300_handle_fndecl_attribute, false },
+ { "monitor", 0, 0, true, false, false,
+ h8300_handle_fndecl_attribute, false },
+ { "function_vector", 0, 0, true, false, false,
+ h8300_handle_fndecl_attribute, false },
+ { "eightbit_data", 0, 0, true, false, false,
+ h8300_handle_eightbit_data_attribute, false },
+ { "tiny_data", 0, 0, true, false, false,
+ h8300_handle_tiny_data_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
===================================================================
@@ -454,8 +454,10 @@ do { \
#define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) (!DECL_ONE_ONLY (DECL))
#define SUBTARGET_ATTRIBUTE_TABLE \
- { "selectany", 0, 0, true, false, false, ix86_handle_selectany_attribute }
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ { "selectany", 0, 0, true, false, false, ix86_handle_selectany_attribute, \
+ false }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
/* mcount() does not need a counter variable. */
#undef NO_PROFILE_COUNTERS
===================================================================
@@ -32270,45 +32270,56 @@ ix86_expand_round (rtx operand0, rtx ope
/* Table of valid machine attributes. */
static const struct attribute_spec ix86_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
/* Stdcall attribute says callee is responsible for popping arguments
if they are not variable. */
- { "stdcall", 0, 0, false, true, true, ix86_handle_cconv_attribute },
+ { "stdcall", 0, 0, false, true, true, ix86_handle_cconv_attribute,
+ true },
/* Fastcall attribute says callee is responsible for popping arguments
if they are not variable. */
- { "fastcall", 0, 0, false, true, true, ix86_handle_cconv_attribute },
+ { "fastcall", 0, 0, false, true, true, ix86_handle_cconv_attribute,
+ true },
/* Thiscall attribute says callee is responsible for popping arguments
if they are not variable. */
- { "thiscall", 0, 0, false, true, true, ix86_handle_cconv_attribute },
+ { "thiscall", 0, 0, false, true, true, ix86_handle_cconv_attribute,
+ true },
/* Cdecl attribute says the callee is a normal C declaration */
- { "cdecl", 0, 0, false, true, true, ix86_handle_cconv_attribute },
+ { "cdecl", 0, 0, false, true, true, ix86_handle_cconv_attribute,
+ true },
/* Regparm attribute specifies how many integer arguments are to be
passed in registers. */
- { "regparm", 1, 1, false, true, true, ix86_handle_cconv_attribute },
+ { "regparm", 1, 1, false, true, true, ix86_handle_cconv_attribute,
+ true },
/* Sseregparm attribute says we are using x86_64 calling conventions
for FP arguments. */
- { "sseregparm", 0, 0, false, true, true, ix86_handle_cconv_attribute },
+ { "sseregparm", 0, 0, false, true, true, ix86_handle_cconv_attribute,
+ true },
/* force_align_arg_pointer says this function realigns the stack at entry. */
{ (const char *)&ix86_force_align_arg_pointer_string, 0, 0,
- false, true, true, ix86_handle_cconv_attribute },
+ false, true, true, ix86_handle_cconv_attribute, false },
#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
- { "dllimport", 0, 0, false, false, false, handle_dll_attribute },
- { "dllexport", 0, 0, false, false, false, handle_dll_attribute },
- { "shared", 0, 0, true, false, false, ix86_handle_shared_attribute },
+ { "dllimport", 0, 0, false, false, false, handle_dll_attribute, false },
+ { "dllexport", 0, 0, false, false, false, handle_dll_attribute, false },
+ { "shared", 0, 0, true, false, false, ix86_handle_shared_attribute,
+ false },
#endif
- { "ms_struct", 0, 0, false, false, false, ix86_handle_struct_attribute },
- { "gcc_struct", 0, 0, false, false, false, ix86_handle_struct_attribute },
+ { "ms_struct", 0, 0, false, false, false, ix86_handle_struct_attribute,
+ false },
+ { "gcc_struct", 0, 0, false, false, false, ix86_handle_struct_attribute,
+ false },
#ifdef SUBTARGET_ATTRIBUTE_TABLE
SUBTARGET_ATTRIBUTE_TABLE,
#endif
/* ms_abi and sysv_abi calling convention function attributes. */
- { "ms_abi", 0, 0, false, true, true, ix86_handle_abi_attribute },
- { "sysv_abi", 0, 0, false, true, true, ix86_handle_abi_attribute },
- { "ms_hook_prologue", 0, 0, true, false, false, ix86_handle_fndecl_attribute },
+ { "ms_abi", 0, 0, false, true, true, ix86_handle_abi_attribute, true },
+ { "sysv_abi", 0, 0, false, true, true, ix86_handle_abi_attribute, true },
+ { "ms_hook_prologue", 0, 0, true, false, false, ix86_handle_fndecl_attribute,
+ false },
{ "callee_pop_aggregate_return", 1, 1, false, true, true,
- ix86_handle_callee_pop_aggregate_return },
+ ix86_handle_callee_pop_aggregate_return, true },
/* End element. */
- { NULL, 0, 0, false, false, false, NULL }
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Implement targetm.vectorize.builtin_vectorization_cost. */
===================================================================
@@ -342,15 +342,18 @@ static section * ia64_hpux_function_sect
/* Table of valid machine attributes. */
static const struct attribute_spec ia64_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "syscall_linkage", 0, 0, false, true, true, NULL },
- { "model", 1, 1, true, false, false, ia64_handle_model_attribute },
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "syscall_linkage", 0, 0, false, true, true, NULL, false },
+ { "model", 1, 1, true, false, false, ia64_handle_model_attribute,
+ false },
#if TARGET_ABI_OPEN_VMS
- { "common_object", 1, 1, true, false, false, ia64_vms_common_object_attribute},
+ { "common_object", 1, 1, true, false, false,
+ ia64_vms_common_object_attribute, false },
#endif
{ "version_id", 1, 1, true, false, false,
- ia64_handle_version_id_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ ia64_handle_version_id_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Implement overriding of the optimization options. */
===================================================================
@@ -3226,11 +3226,12 @@ current_function_special_page_vector (rt
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE m32c_attribute_table
static const struct attribute_spec m32c_attribute_table[] = {
- {"interrupt", 0, 0, false, false, false, interrupt_handler},
- {"bank_switch", 0, 0, false, false, false, interrupt_handler},
- {"fast_interrupt", 0, 0, false, false, false, interrupt_handler},
- {"function_vector", 1, 1, true, false, false, function_vector_handler},
- {0, 0, 0, 0, 0, 0, 0}
+ {"interrupt", 0, 0, false, false, false, interrupt_handler, false},
+ {"bank_switch", 0, 0, false, false, false, interrupt_handler, false},
+ {"fast_interrupt", 0, 0, false, false, false, interrupt_handler, false},
+ {"function_vector", 1, 1, true, false, false, function_vector_handler,
+ false},
+ {0, 0, 0, 0, 0, 0, 0, false}
};
#undef TARGET_COMP_TYPE_ATTRIBUTES
===================================================================
@@ -107,10 +107,12 @@ static void m32r_trampoline_init (rtx, t
static const struct attribute_spec m32r_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt", 0, 0, true, false, false, NULL },
- { "model", 1, 1, true, false, false, m32r_handle_model_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "interrupt", 0, 0, true, false, false, NULL, false },
+ { "model", 1, 1, true, false, false, m32r_handle_model_attribute,
+ false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
static const struct default_options m32r_option_optimization_table[] =
===================================================================
@@ -231,13 +231,19 @@ static const struct processor_costs m681
static const struct attribute_spec m68hc11_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt", 0, 0, false, true, true, m68hc11_handle_fntype_attribute },
- { "trap", 0, 0, false, true, true, m68hc11_handle_fntype_attribute },
- { "far", 0, 0, false, true, true, m68hc11_handle_fntype_attribute },
- { "near", 0, 0, false, true, true, m68hc11_handle_fntype_attribute },
- { "page0", 0, 0, false, false, false, m68hc11_handle_page0_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "interrupt", 0, 0, false, true, true, m68hc11_handle_fntype_attribute,
+ false },
+ { "trap", 0, 0, false, true, true, m68hc11_handle_fntype_attribute,
+ false },
+ { "far", 0, 0, false, true, true, m68hc11_handle_fntype_attribute,
+ false },
+ { "near", 0, 0, false, true, true, m68hc11_handle_fntype_attribute,
+ false },
+ { "page0", 0, 0, false, false, false, m68hc11_handle_page0_attribute,
+ false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Initialize the GCC target structure. */
===================================================================
@@ -298,11 +298,15 @@ const char *m68k_library_id_string = "_c
static const struct attribute_spec m68k_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt", 0, 0, true, false, false, m68k_handle_fndecl_attribute },
- { "interrupt_handler", 0, 0, true, false, false, m68k_handle_fndecl_attribute },
- { "interrupt_thread", 0, 0, true, false, false, m68k_handle_fndecl_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "interrupt", 0, 0, true, false, false, m68k_handle_fndecl_attribute,
+ false },
+ { "interrupt_handler", 0, 0, true, false, false,
+ m68k_handle_fndecl_attribute, false },
+ { "interrupt_thread", 0, 0, true, false, false,
+ m68k_handle_fndecl_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
struct gcc_target targetm = TARGET_INITIALIZER;
===================================================================
@@ -156,11 +156,13 @@ static void mcore_option_override
static const struct attribute_spec mcore_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "dllexport", 0, 0, true, false, false, NULL },
- { "dllimport", 0, 0, true, false, false, NULL },
- { "naked", 0, 0, true, false, false, mcore_handle_naked_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "dllexport", 0, 0, true, false, false, NULL, false },
+ { "dllimport", 0, 0, true, false, false, NULL, false },
+ { "naked", 0, 0, true, false, false, mcore_handle_naked_attribute,
+ false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* What options are we going to default to specific settings when
===================================================================
@@ -4088,17 +4088,19 @@ mep_validate_vliw (tree *node, tree name
static const struct attribute_spec mep_attribute_table[11] =
{
- /* name min max decl type func handler */
- { "based", 0, 0, false, false, false, mep_validate_based_tiny },
- { "tiny", 0, 0, false, false, false, mep_validate_based_tiny },
- { "near", 0, 0, false, false, false, mep_validate_near_far },
- { "far", 0, 0, false, false, false, mep_validate_near_far },
- { "disinterrupt", 0, 0, false, false, false, mep_validate_disinterrupt },
- { "interrupt", 0, 0, false, false, false, mep_validate_interrupt },
- { "io", 0, 1, false, false, false, mep_validate_io_cb },
- { "cb", 0, 1, false, false, false, mep_validate_io_cb },
- { "vliw", 0, 0, false, true, false, mep_validate_vliw },
- { NULL, 0, 0, false, false, false, NULL }
+ /* name min max decl type func handler
+ on_diagnostic */
+ { "based", 0, 0, false, false, false, mep_validate_based_tiny, false },
+ { "tiny", 0, 0, false, false, false, mep_validate_based_tiny, false },
+ { "near", 0, 0, false, false, false, mep_validate_near_far, false },
+ { "far", 0, 0, false, false, false, mep_validate_near_far, false },
+ { "disinterrupt", 0, 0, false, false, false, mep_validate_disinterrupt,
+ false },
+ { "interrupt", 0, 0, false, false, false, mep_validate_interrupt, false },
+ { "io", 0, 1, false, false, false, mep_validate_io_cb, false },
+ { "cb", 0, 1, false, false, false, mep_validate_io_cb, false },
+ { "vliw", 0, 0, false, true, false, mep_validate_vliw, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
static bool
===================================================================
@@ -195,10 +195,14 @@ int interrupt_handler;
int save_volatiles;
const struct attribute_spec microblaze_attribute_table[] = {
- /* name min_len, max_len, decl_req, type_req, fn_type, req_handler */
- {"interrupt_handler", 0, 0, true, false, false, NULL},
- {"save_volatiles" , 0, 0, true, false, false, NULL},
- { NULL, 0, 0, false, false, false, NULL}
+ /* name min_len, max_len, decl_req, type_req, fn_type, req_handler,
+ on_diagnostic */
+ {"interrupt_handler", 0, 0, true, false, false, NULL,
+ false },
+ {"save_volatiles" , 0, 0, true, false, false, NULL,
+ false },
+ { NULL, 0, 0, false, false, false, NULL,
+ false }
};
static int microblaze_interrupt_function_p (tree);
===================================================================
@@ -640,22 +640,23 @@ const enum reg_class mips_regno_to_class
/* The value of TARGET_ATTRIBUTE_TABLE. */
static const struct attribute_spec mips_attribute_table[] = {
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "long_call", 0, 0, false, true, true, NULL },
- { "far", 0, 0, false, true, true, NULL },
- { "near", 0, 0, false, true, true, NULL },
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ om_diagnostic } */
+ { "long_call", 0, 0, false, true, true, NULL, false },
+ { "far", 0, 0, false, true, true, NULL, false },
+ { "near", 0, 0, false, true, true, NULL, false },
/* We would really like to treat "mips16" and "nomips16" as type
attributes, but GCC doesn't provide the hooks we need to support
the right conversion rules. As declaration attributes, they affect
code generation but don't carry other semantics. */
- { "mips16", 0, 0, true, false, false, NULL },
- { "nomips16", 0, 0, true, false, false, NULL },
+ { "mips16", 0, 0, true, false, false, NULL, false },
+ { "nomips16", 0, 0, true, false, false, NULL, false },
/* Allow functions to be specified as interrupt handlers */
- { "interrupt", 0, 0, false, true, true, NULL },
- { "use_shadow_register_set", 0, 0, false, true, true, NULL },
- { "keep_interrupts_masked", 0, 0, false, true, true, NULL },
- { "use_debug_exception_return", 0, 0, false, true, true, NULL },
- { NULL, 0, 0, false, false, false, NULL }
+ { "interrupt", 0, 0, false, true, true, NULL, false },
+ { "use_shadow_register_set", 0, 0, false, true, true, NULL, false },
+ { "keep_interrupts_masked", 0, 0, false, true, true, NULL, false },
+ { "use_debug_exception_return", 0, 0, false, true, true, NULL, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* A table describing all the processors GCC knows about. Names are
===================================================================
@@ -1295,16 +1295,22 @@ static const char alt_reg_names[][8] =
static const struct attribute_spec rs6000_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "altivec", 1, 1, false, true, false, rs6000_handle_altivec_attribute },
- { "longcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
- { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute },
- { "ms_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
- { "gcc_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute },
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "altivec", 1, 1, false, true, false, rs6000_handle_altivec_attribute,
+ false },
+ { "longcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute,
+ false },
+ { "shortcall", 0, 0, false, true, true, rs6000_handle_longcall_attribute,
+ false },
+ { "ms_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute,
+ false },
+ { "gcc_struct", 0, 0, false, false, false, rs6000_handle_struct_attribute,
+ false },
#ifdef SUBTARGET_ATTRIBUTE_TABLE
SUBTARGET_ATTRIBUTE_TABLE,
#endif
- { NULL, 0, 0, false, false, false, NULL }
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
===================================================================
@@ -2159,11 +2159,15 @@ rx_handle_func_attribute (tree * node,
/* Table of RX specific attributes. */
const struct attribute_spec rx_attribute_table[] =
{
- /* Name, min_len, max_len, decl_req, type_req, fn_type_req, handler. */
- { "fast_interrupt", 0, 0, true, false, false, rx_handle_func_attribute },
- { "interrupt", 0, 0, true, false, false, rx_handle_func_attribute },
- { "naked", 0, 0, true, false, false, rx_handle_func_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* Name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic. */
+ { "fast_interrupt", 0, 0, true, false, false, rx_handle_func_attribute,
+ false },
+ { "interrupt", 0, 0, true, false, false, rx_handle_func_attribute,
+ false },
+ { "naked", 0, 0, true, false, false, rx_handle_func_attribute,
+ false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Extra processing for target specific command line options. */
===================================================================
@@ -306,15 +306,24 @@ static void sh_conditional_register_usag
static const struct attribute_spec sh_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt_handler", 0, 0, true, false, false, sh_handle_interrupt_handler_attribute },
- { "sp_switch", 1, 1, true, false, false, sh_handle_sp_switch_attribute },
- { "trap_exit", 1, 1, true, false, false, sh_handle_trap_exit_attribute },
- { "renesas", 0, 0, false, true, false, sh_handle_renesas_attribute },
- { "trapa_handler", 0, 0, true, false, false, sh_handle_interrupt_handler_attribute },
- { "nosave_low_regs", 0, 0, true, false, false, sh_handle_interrupt_handler_attribute },
- { "resbank", 0, 0, true, false, false, sh_handle_resbank_handler_attribute },
- { "function_vector", 1, 1, true, false, false, sh2a_handle_function_vector_handler_attribute },
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "interrupt_handler", 0, 0, true, false, false,
+ sh_handle_interrupt_handler_attribute, false },
+ { "sp_switch", 1, 1, true, false, false,
+ sh_handle_sp_switch_attribute, false },
+ { "trap_exit", 1, 1, true, false, false,
+ sh_handle_trap_exit_attribute, false },
+ { "renesas", 0, 0, false, true, false,
+ sh_handle_renesas_attribute, false },
+ { "trapa_handler", 0, 0, true, false, false,
+ sh_handle_interrupt_handler_attribute, false },
+ { "nosave_low_regs", 0, 0, true, false, false,
+ sh_handle_interrupt_handler_attribute, false },
+ { "resbank", 0, 0, true, false, false,
+ sh_handle_resbank_handler_attribute, false },
+ { "function_vector", 1, 1, true, false, false,
+ sh2a_handle_function_vector_handler_attribute, false },
#ifdef SYMBIAN
/* Symbian support adds three new attributes:
dllexport - for exporting a function/variable that will live in a dll
@@ -323,10 +332,12 @@ static const struct attribute_spec sh_at
Microsoft allows multiple declspecs in one __declspec, separating
them with spaces. We do NOT support this. Instead, use __declspec
multiple times. */
- { "dllimport", 0, 0, true, false, false, sh_symbian_handle_dll_attribute },
- { "dllexport", 0, 0, true, false, false, sh_symbian_handle_dll_attribute },
+ { "dllimport", 0, 0, true, false, false,
+ sh_symbian_handle_dll_attribute, false },
+ { "dllexport", 0, 0, true, false, false,
+ sh_symbian_handle_dll_attribute, false },
#endif
- { NULL, 0, 0, false, false, false, NULL }
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Set default optimization options. */
===================================================================
@@ -258,8 +258,8 @@ __enable_execute_stack (void *addr)
/* #pragma init and #pragma fini are implemented on top of init and
fini attributes. */
#define SOLARIS_ATTRIBUTE_TABLE \
- { "init", 0, 0, true, false, false, NULL }, \
- { "fini", 0, 0, true, false, false, NULL }
+ { "init", 0, 0, true, false, false, NULL, false }, \
+ { "fini", 0, 0, true, false, false, NULL, false }
/* Solaris/x86 as and gas support the common ELF .section/.pushsection
syntax. */
===================================================================
@@ -475,9 +475,10 @@ static enum machine_mode sparc_preferred
/* Table of valid machine attributes. */
static const struct attribute_spec sparc_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ do_diagnostic } */
SUBTARGET_ATTRIBUTE_TABLE,
- { NULL, 0, 0, false, false, false, NULL }
+ { NULL, 0, 0, false, false, false, NULL, false }
};
#endif
===================================================================
@@ -292,10 +292,13 @@ spu_libgcc_shift_count_mode (void);
/* Table of machine attributes. */
static const struct attribute_spec spu_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "naked", 0, 0, true, false, false, spu_handle_fndecl_attribute },
- { "spu_vector", 0, 0, false, true, false, spu_handle_vector_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "naked", 0, 0, true, false, false, spu_handle_fndecl_attribute,
+ false },
+ { "spu_vector", 0, 0, false, true, false, spu_handle_vector_attribute,
+ false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* TARGET overrides. */
===================================================================
@@ -2201,11 +2201,15 @@ static tree xstormy16_handle_below100_at
static const struct attribute_spec xstormy16_attribute_table[] =
{
- /* name, min_len, max_len, decl_req, type_req, fn_type_req, handler. */
- { "interrupt", 0, 0, false, true, true, xstormy16_handle_interrupt_attribute },
- { "BELOW100", 0, 0, false, false, false, xstormy16_handle_below100_attribute },
- { "below100", 0, 0, false, false, false, xstormy16_handle_below100_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic. */
+ { "interrupt", 0, 0, false, true, true,
+ xstormy16_handle_interrupt_attribute , false },
+ { "BELOW100", 0, 0, false, false, false,
+ xstormy16_handle_below100_attribute, false },
+ { "below100", 0, 0, false, false, false,
+ xstormy16_handle_below100_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Handle an "interrupt" attribute;
===================================================================
@@ -3118,13 +3118,19 @@ v850_issue_rate (void)
static const struct attribute_spec v850_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt_handler", 0, 0, true, false, false, v850_handle_interrupt_attribute },
- { "interrupt", 0, 0, true, false, false, v850_handle_interrupt_attribute },
- { "sda", 0, 0, true, false, false, v850_handle_data_area_attribute },
- { "tda", 0, 0, true, false, false, v850_handle_data_area_attribute },
- { "zda", 0, 0, true, false, false, v850_handle_data_area_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "interrupt_handler", 0, 0, true, false, false,
+ v850_handle_interrupt_attribute, false },
+ { "interrupt", 0, 0, true, false, false,
+ v850_handle_interrupt_attribute, false },
+ { "sda", 0, 0, true, false, false,
+ v850_handle_data_area_attribute, false },
+ { "tda", 0, 0, true, false, false,
+ v850_handle_data_area_attribute, false },
+ { "zda", 0, 0, true, false, false,
+ v850_handle_data_area_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Initialize the GCC target structure. */
===================================================================
@@ -2574,11 +2574,15 @@ zero_init_p (const_tree t)
/* Table of valid C++ attributes. */
const struct attribute_spec cxx_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "java_interface", 0, 0, false, false, false, handle_java_interface_attribute },
- { "com_interface", 0, 0, false, false, false, handle_com_interface_attribute },
- { "init_priority", 1, 1, true, false, false, handle_init_priority_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
+ { "java_interface", 0, 0, false, false, false,
+ handle_java_interface_attribute, false },
+ { "com_interface", 0, 0, false, false, false,
+ handle_com_interface_attribute, false },
+ { "init_priority", 1, 1, true, false, false,
+ handle_init_priority_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Handle a "java_interface" attribute; arguments as in
===================================================================
@@ -331,7 +331,7 @@ handle_user_attribute (tree *node, tree
/* Attribute definition */
static struct attribute_spec user_attr =
- @{ "user", 1, 1, false, false, false, handle_user_attribute @};
+ @{ "user", 1, 1, false, false, false, handle_user_attribute, false @};
/* Plugin callback called during attribute registration.
Registered with register_callback (plugin_name, PLUGIN_ATTRIBUTES, register_attributes, NULL)
===================================================================
@@ -75,8 +75,8 @@ static tree java_eh_personality (void);
const struct attribute_spec java_attribute_table[] =
{
{ "nonnull", 0, -1, false, true, true,
- NULL },
- { NULL, 0, 0, false, false, false, NULL }
+ NULL, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Used to avoid printing error messages with bogus function
===================================================================
@@ -51,29 +51,30 @@ static tree handle_format_arg_attribute
/* Table of machine-independent attributes supported in GIMPLE. */
const struct attribute_spec lto_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ do_diagnostic } */
{ "noreturn", 0, 0, true, false, false,
- handle_noreturn_attribute },
+ handle_noreturn_attribute, false },
{ "leaf", 0, 0, true, false, false,
- handle_leaf_attribute },
+ handle_leaf_attribute, false },
/* The same comments as for noreturn attributes apply to const ones. */
{ "const", 0, 0, true, false, false,
- handle_const_attribute },
+ handle_const_attribute, false },
{ "malloc", 0, 0, true, false, false,
- handle_malloc_attribute },
+ handle_malloc_attribute, false },
{ "pure", 0, 0, true, false, false,
- handle_pure_attribute },
+ handle_pure_attribute, false },
{ "no vops", 0, 0, true, false, false,
- handle_novops_attribute },
+ handle_novops_attribute, false },
{ "nonnull", 0, -1, false, true, true,
- handle_nonnull_attribute },
+ handle_nonnull_attribute, false },
{ "nothrow", 0, 0, true, false, false,
- handle_nothrow_attribute },
+ handle_nothrow_attribute, false },
{ "sentinel", 0, 1, false, true, true,
- handle_sentinel_attribute },
+ handle_sentinel_attribute, false },
{ "type generic", 0, 0, false, true, true,
- handle_type_generic_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ handle_type_generic_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
/* Give the specifications for the format attributes, used by C and all
@@ -81,12 +82,13 @@ const struct attribute_spec lto_attribut
const struct attribute_spec lto_format_attribute_table[] =
{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+ on_diagnostic } */
{ "format", 3, 3, false, true, true,
- handle_format_attribute },
+ handle_format_attribute, false },
{ "format_arg", 1, 1, false, true, true,
- handle_format_arg_attribute },
- { NULL, 0, 0, false, false, false, NULL }
+ handle_format_arg_attribute, false },
+ { NULL, 0, 0, false, false, false, NULL, false }
};
enum built_in_attribute
===================================================================
@@ -26,7 +26,7 @@ handle_user_attribute (tree *node, tree
/* Attribute definition */
static struct attribute_spec user_attr =
- { "user", 1, 1, false, false, false, handle_user_attribute };
+ { "user", 1, 1, false, false, false, handle_user_attribute, false };
/* Plugin callback called during attribute registration */
===================================================================
@@ -4330,6 +4330,8 @@ struct attribute_spec
by the rest of this structure. */
tree (*const handler) (tree *node, tree name, tree args,
int flags, bool *no_add_attrs);
+ /* Specifies if attribute gets displayed on diagnostic output. */
+ const bool on_diagnostic;
};
/* Flags that may be passed in the third argument of decl_attributes, and