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

ensadc at mailnesia dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ensadc at mailnesia dot com

--- Comment #4 from ensadc at mailnesia dot com ---
The culprit seems to be this `decay_conversion` call in `convert_arguments`
(defined in `cp/typeck.cc`):

>      if (type == 0 || !TYPE_REF_P (type))
>       {
>         if (TREE_CODE (TREE_TYPE (val)) == ARRAY_TYPE
>             || FUNC_OR_METHOD_TYPE_P (TREE_TYPE (val)))
>           val = decay_conversion (val, complain);
>       }

It's unclear to me whether this conversion is needed there (doesn't
convert_for_initialization or convert_arg_to_ellipsis take care of this?), but
at least the conversion shouldn't apply if `type` is a class type.

Reply via email to