aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMatthew Wahab <matthew.wahab@arm.com>2016-05-16 10:22:25 +0000
committerMatthew Wahab <mwahab@gcc.gnu.org>2016-05-16 10:22:25 +0000
commit8fad45f5b6577a0b999ee32ab07108b16522ab1b (patch)
treedae4d881b454aa2b60b420ca1c47550c452cbdf5 /gcc
parent34da9c9840ae773d1b0196a9e27ffa2b40ed14f9 (diff)
downloadgcc-8fad45f5b6577a0b999ee32ab07108b16522ab1b.zip
gcc-8fad45f5b6577a0b999ee32ab07108b16522ab1b.tar.gz
gcc-8fad45f5b6577a0b999ee32ab07108b16522ab1b.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/c/ChangeLog7
-rw-r--r--gcc/c/c-decl.c17
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/decl.c16
-rw-r--r--gcc/doc/tm.texi14
-rw-r--r--gcc/doc/tm.texi.in4
-rw-r--r--gcc/system.h4
-rw-r--r--gcc/target.def22
9 files changed, 27 insertions, 74 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7f70b9c..88e39ab 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index c726e9f..67b300a 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -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
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index b2dd644..9441fbb 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -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);
}
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 025c412..1884bc9 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 126d870..d493a77 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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)
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 057ac9a..8c7f2a1 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -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,
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 643f0eb..f963a58 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -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
diff --git a/gcc/system.h b/gcc/system.h
index 984f302..78a7da6 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -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
diff --git a/gcc/target.def b/gcc/target.def
index 20f2b32..6392e73 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -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. */