Remove TARGET_INVALID_PARAMETER_TYPE and TARGET_INVALID_RETURN_TYPE hooks.
c/ 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. cp/ 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. gcc/ 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. From-SVN: r236276
This commit is contained in:
parent
34da9c9840
commit
8fad45f5b6
|
@ -1,3 +1,13 @@
|
|||
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
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -5356,7 +5356,6 @@ grokdeclarator (const struct c_declarator *declarator,
|
|||
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;
|
||||
|
@ -6090,12 +6089,6 @@ grokdeclarator (const struct c_declarator *declarator,
|
|||
"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. */
|
||||
|
@ -6847,7 +6840,6 @@ grokparms (struct c_arg_info *arg_info, bool funcdef_flag)
|
|||
{
|
||||
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
|
||||
|
@ -6896,15 +6888,6 @@ grokparms (struct c_arg_info *arg_info, bool funcdef_flag)
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -9247,7 +9247,6 @@ grokdeclarator (const cp_declarator *declarator,
|
|||
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);
|
||||
|
@ -10047,12 +10046,6 @@ grokdeclarator (const cp_declarator *declarator,
|
|||
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. */
|
||||
|
||||
|
@ -11686,7 +11679,6 @@ grokparms (tree parmlist, tree *parms)
|
|||
tree type = NULL_TREE;
|
||||
tree init = TREE_PURPOSE (parm);
|
||||
tree decl = TREE_VALUE (parm);
|
||||
const char *errmsg;
|
||||
|
||||
if (parm == void_list_node)
|
||||
break;
|
||||
|
@ -11729,14 +11721,6 @@ grokparms (tree parmlist, tree *parms)
|
|||
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)
|
||||
|
|
|
@ -11504,20 +11504,6 @@ and @var{type2}, or @code{NULL} if validity should be determined by
|
|||
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,
|
||||
|
|
|
@ -8173,10 +8173,6 @@ and scanf formatter settings.
|
|||
|
||||
@hook TARGET_INVALID_BINARY_OP
|
||||
|
||||
@hook TARGET_INVALID_PARAMETER_TYPE
|
||||
|
||||
@hook TARGET_INVALID_RETURN_TYPE
|
||||
|
||||
@hook TARGET_PROMOTED_TYPE
|
||||
|
||||
@hook TARGET_CONVERT_TO_TYPE
|
||||
|
|
|
@ -987,7 +987,9 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
|
|||
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
|
||||
|
|
|
@ -4820,28 +4820,6 @@ the front end.",
|
|||
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. */
|
||||
|
|
Loading…
Reference in New Issue