diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-11-21 07:54:35 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2025-04-27 10:36:56 +0800 |
commit | a670ebde3995481225ec62b29686ec07a21e5c10 (patch) | |
tree | 74b8e87e9a15b71a1fb205eb8ddbe60578232800 /gcc/ada/gcc-interface/utils.cc | |
parent | 78db4753c9646a372512e6a951fced12f74de0bc (diff) | |
download | gcc-a670ebde3995481225ec62b29686ec07a21e5c10.zip gcc-a670ebde3995481225ec62b29686ec07a21e5c10.tar.gz gcc-a670ebde3995481225ec62b29686ec07a21e5c10.tar.bz2 |
Drop targetm.promote_prototypes from C, C++ and Ada frontends
Remove the targetm.calls.promote_prototypes call from C, C++ and Ada
frontends.
gcc/
PR c/48274
PR middle-end/112877
PR middle-end/118288
* gimple.cc (gimple_builtin_call_types_compatible_p): Remove the
targetm.calls.promote_prototypes call.
* tree.cc (tree_builtin_call_types_compatible_p): Likewise.
gcc/ada/
PR middle-end/112877
* gcc-interface/utils.cc (create_param_decl): Remove the
targetm.calls.promote_prototypes call.
gcc/c/
PR c/48274
PR middle-end/112877
PR middle-end/118288
* c-decl.cc (start_decl): Remove the
targetm.calls.promote_prototypes call.
(store_parm_decls_oldstyle): Likewise.
(finish_function): Likewise.
* c-typeck.cc (convert_argument): Likewise.
(c_safe_arg_type_equiv_p): Likewise.
gcc/cp/
PR middle-end/112877
* call.cc (type_passed_as): Remove the
targetm.calls.promote_prototypes call.
(convert_for_arg_passing): Likewise.
* typeck.cc (cxx_safe_arg_type_equiv_p): Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'gcc/ada/gcc-interface/utils.cc')
-rw-r--r-- | gcc/ada/gcc-interface/utils.cc | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc index 9212827..23737c3 100644 --- a/gcc/ada/gcc-interface/utils.cc +++ b/gcc/ada/gcc-interface/utils.cc @@ -3286,30 +3286,6 @@ tree create_param_decl (tree name, tree type) { tree param_decl = build_decl (input_location, PARM_DECL, name, type); - - /* Honor TARGET_PROMOTE_PROTOTYPES like the C compiler, as not doing so - can lead to various ABI violations. */ - if (targetm.calls.promote_prototypes (NULL_TREE) - && INTEGRAL_TYPE_P (type) - && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)) - { - /* We have to be careful about biased types here. Make a subtype - of integer_type_node with the proper biasing. */ - if (TREE_CODE (type) == INTEGER_TYPE - && TYPE_BIASED_REPRESENTATION_P (type)) - { - tree subtype - = make_unsigned_type (TYPE_PRECISION (integer_type_node)); - TREE_TYPE (subtype) = integer_type_node; - TYPE_BIASED_REPRESENTATION_P (subtype) = 1; - SET_TYPE_RM_MIN_VALUE (subtype, TYPE_MIN_VALUE (type)); - SET_TYPE_RM_MAX_VALUE (subtype, TYPE_MAX_VALUE (type)); - type = subtype; - } - else - type = integer_type_node; - } - DECL_ARG_TYPE (param_decl) = type; return param_decl; } |