https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111796

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> (In reply to Richard Biener from comment #1)
> > It's the promote_prototypes hook btw.
> 
> Of the major targets (x86, arm, aarch64, powerpc, s390, riscv) only x86
> defines the hook to true.  But there are a lot of embedded archs doing so,
> and ia64 and the pa.

Interestingly the Ada frontend has

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))
    {
...
        type = integer_type_node;
    }
...
  DECL_ARG_TYPE (param_decl) = type;

but the hook is nowhere called in other frontends besides C, C++ and Ada.

Reply via email to