+2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
+
+ * doc/tm.texi: Regenerate.
+ * doc/tm.texi.in (TARGET_INVALID_PARAMETER_TYPE): Remove.
+ (TARGET_INVALID_RETURN_TYPE): Remove.
+ * system.h: Poison TARGET_INVALID_PARAMETER_TYPE and
+ TARGET_INVALID_RETURN_TYPE.
+ * target.def (invalid_parameter_type): Remove.
+ (invalid_return_type): Remove.
+
2016-05-16 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline-analysis.c (compute_inline_parameters): Be more reailistic
+2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
+
+ * c-decl.c (grokdeclarator): Remove errmsg and use of
+ targetm.invalid_return_type.
+ (grokparms): Remove errmsg and use of
+ targetm.invalid_parameter_type.
+
2016-05-13 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (grokdeclarator): For C11, discard qualifiers on
struct c_arg_info *arg_info = 0;
addr_space_t as1, as2, address_space;
location_t loc = UNKNOWN_LOCATION;
- const char *errmsg;
tree expr_dummy;
bool expr_const_operands_dummy;
enum c_declarator_kind first_non_attr_kind;
"an array");
type = integer_type_node;
}
- errmsg = targetm.invalid_return_type (type);
- if (errmsg)
- {
- error (errmsg);
- type = integer_type_node;
- }
/* Construct the function type and go to the next
inner layer of declarator. */
{
tree parm, type, typelt;
unsigned int parmno;
- const char *errmsg;
/* If there is a parameter of incomplete type in a definition,
this is an error. In a declaration this is valid, and a
}
}
- errmsg = targetm.invalid_parameter_type (type);
- if (errmsg)
- {
- error (errmsg);
- TREE_VALUE (typelt) = error_mark_node;
- TREE_TYPE (parm) = error_mark_node;
- arg_types = NULL_TREE;
- }
-
if (DECL_NAME (parm) && TREE_USED (parm))
warn_if_shadowing (parm);
}
+2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
+
+ * decl.c (grokdeclarator): Remove errmsg and use of
+ targetm.invalid_return_type.
+ (grokparms): Remove errmsg and use of
+ targetm.invalid_parameter_type.
+
2016-05-13 Jason Merrill <jason@redhat.com>
PR c++/10200
bool late_return_type_p = false;
bool array_parameter_p = false;
source_location saved_loc = input_location;
- const char *errmsg;
tree reqs = NULL_TREE;
signed_p = decl_spec_seq_has_spec_p (declspecs, ds_signed);
decl, but to its return type. */
type_quals = TYPE_UNQUALIFIED;
}
- errmsg = targetm.invalid_return_type (type);
- if (errmsg)
- {
- error (errmsg);
- type = integer_type_node;
- }
/* Error about some types functions can't return. */
tree type = NULL_TREE;
tree init = TREE_PURPOSE (parm);
tree decl = TREE_VALUE (parm);
- const char *errmsg;
if (parm == void_list_node)
break;
init = NULL_TREE;
}
- if (type != error_mark_node
- && (errmsg = targetm.invalid_parameter_type (type)))
- {
- error (errmsg);
- type = error_mark_node;
- TREE_TYPE (decl) = error_mark_node;
- }
-
if (type != error_mark_node)
{
if (deprecated_state != DEPRECATED_SUPPRESS)
the front end.
@end deftypefn
-@deftypefn {Target Hook} {const char *} TARGET_INVALID_PARAMETER_TYPE (const_tree @var{type})
-If defined, this macro returns the diagnostic message when it is
-invalid for functions to include parameters of type @var{type},
-or @code{NULL} if validity should be determined by
-the front end. This is currently used only by the C and C++ front ends.
-@end deftypefn
-
-@deftypefn {Target Hook} {const char *} TARGET_INVALID_RETURN_TYPE (const_tree @var{type})
-If defined, this macro returns the diagnostic message when it is
-invalid for functions to have return type @var{type},
-or @code{NULL} if validity should be determined by
-the front end. This is currently used only by the C and C++ front ends.
-@end deftypefn
-
@deftypefn {Target Hook} tree TARGET_PROMOTED_TYPE (const_tree @var{type})
If defined, this target hook returns the type to which values of
@var{type} should be promoted when they appear in expressions,
@hook TARGET_INVALID_BINARY_OP
-@hook TARGET_INVALID_PARAMETER_TYPE
-
-@hook TARGET_INVALID_RETURN_TYPE
-
@hook TARGET_PROMOTED_TYPE
@hook TARGET_CONVERT_TO_TYPE
TARGET_HANDLE_PRAGMA_EXTERN_PREFIX \
TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN \
TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD \
- TARGET_MD_ASM_CLOBBERS TARGET_RELAXED_ORDERING EXTENDED_SDB_BASIC_TYPES
+ TARGET_MD_ASM_CLOBBERS TARGET_RELAXED_ORDERING \
+ EXTENDED_SDB_BASIC_TYPES TARGET_INVALID_PARAMETER_TYPE \
+ TARGET_INVALID_RETURN_TYPE
/* Arrays that were deleted in favor of a functional interface. */
#pragma GCC poison built_in_decls implicit_built_in_decls
const char *, (int op, const_tree type1, const_tree type2),
hook_constcharptr_int_const_tree_const_tree_null)
-/* Return the diagnostic message string if TYPE is not valid as a
- function parameter type, NULL otherwise. */
-DEFHOOK
-(invalid_parameter_type,
- "If defined, this macro returns the diagnostic message when it is\n\
-invalid for functions to include parameters of type @var{type},\n\
-or @code{NULL} if validity should be determined by\n\
-the front end. This is currently used only by the C and C++ front ends.",
- const char *, (const_tree type),
- hook_constcharptr_const_tree_null)
-
-/* Return the diagnostic message string if TYPE is not valid as a
- function return type, NULL otherwise. */
-DEFHOOK
-(invalid_return_type,
- "If defined, this macro returns the diagnostic message when it is\n\
-invalid for functions to have return type @var{type},\n\
-or @code{NULL} if validity should be determined by\n\
-the front end. This is currently used only by the C and C++ front ends.",
- const char *, (const_tree type),
- hook_constcharptr_const_tree_null)
-
/* If values of TYPE are promoted to some other type when used in
expressions (analogous to the integer promotions), return that type,
or NULL_TREE otherwise. */