diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2009-05-20 23:06:12 -0400 |
---|---|---|
committer | Sandra Loosemore <sandra@gcc.gnu.org> | 2009-05-20 23:06:12 -0400 |
commit | 40449a90d7701eb70b5ccecb0f05290d442983e9 (patch) | |
tree | 09231bb5a5f48721cdd7033ca7c944b29771f3cf /gcc/target.h | |
parent | d29d4507b20843bca8000bb9ebeeff3637dd31ba (diff) | |
download | gcc-40449a90d7701eb70b5ccecb0f05290d442983e9.zip gcc-40449a90d7701eb70b5ccecb0f05290d442983e9.tar.gz gcc-40449a90d7701eb70b5ccecb0f05290d442983e9.tar.bz2 |
tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE...
2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* doc/tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE,
TARGET_INVALID_RETURN_TYPE, TARGET_PROMOTED_TYPE, and
TARGET_CONVERT_TO_TYPE.
* hooks.c (hook_tree_const_tree_null): Define.
* hooks.h (hook_tree_const_tree_null): Declare.
* target.h (struct gcc_target): Add invalid_parameter_type,
invalid_return_type, promoted_type, and convert_to_type fields.
* target-def.h: (TARGET_INVALID_PARAMETER_TYPE): Define.
(TARGET_INVALID_RETURN_TYPE): Define.
(TARGET_PROMOTED_TYPE): Define.
(TARGET_CONVERT_TO_TYPE): Define.
(TARGET_INITIALIZER): Update for new fields.
* c-decl.c (grokdeclarator): Check targetm.invalid_return_type.
(grokparms): Check targetm.invalid_parameter_type.
* c-typeck.c (default_conversion): Check targetm.promoted_type.
* c-convert.c (convert): Check targetm.convert_to_type.
gcc/cp/
* typeck.c (default_conversion): Check targetm.promoted_type.
* decl.c (grokdeclarator): Check targetm.invalid_return_type.
(grokparms): Check targetm.invalid_parameter_type.
* cvt.c (ocp_convert): Check targetm.convert_to_type.
(build_expr_type_conversion): Check targetm.promoted_type.
From-SVN: r147758
Diffstat (limited to 'gcc/target.h')
-rw-r--r-- | gcc/target.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/target.h b/gcc/target.h index 43bdfc4..d851425 100644 --- a/gcc/target.h +++ b/gcc/target.h @@ -913,6 +913,24 @@ struct gcc_target is not permitted on TYPE1 and TYPE2, NULL otherwise. */ const char *(*invalid_binary_op) (int op, const_tree type1, const_tree type2); + /* Return the diagnostic message string if TYPE is not valid as a + function parameter type, NULL otherwise. */ + const char *(*invalid_parameter_type) (const_tree type); + + /* Return the diagnostic message string if TYPE is not valid as a + function return type, NULL otherwise. */ + const char *(*invalid_return_type) (const_tree type); + + /* 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. */ + tree (*promoted_type) (const_tree type); + + /* Convert EXPR to TYPE, if target-specific types with special conversion + rules are involved. Return the converted expression, or NULL to apply + the standard conversion rules. */ + tree (*convert_to_type) (tree type, tree expr); + /* Return the array of IRA cover classes for the current target. */ const enum reg_class *(*ira_cover_classes) (void); |