On Tue, Nov 10, 2026 at 11:25 PM Shiva S <[email protected]> wrote:
>
> The using-declaration in cfn_popcount names range_operator,
> which is an indirect base class. Earlier C++ language rules
> required a using-declaration to name a direct base class.

Did this change in C++17 over C++14? Or was this in C++14 still?
Does this fix say compiling GCC with GCC 5.4? Or with clang?

>
> Name cfn_ffs instead, preserving the existing behaviour
> and compatibility with compilers enforcing that restriction.
>
> gcc/ChangeLog:
>
>         * gimple-range-op.cc (class cfn_popcount): Name the direct
>         base cfn_ffs instead of range_operator in the using-declaration
>         for fold_range.

I think this is obvious otherwise.  But I think you should expand on
the commit message of why the change is needed; e.g. where this was
changed.

Also you didn't describe how you tested the patch.

>
> Bootstrapped and regression-tested on aarch64-unknown-linux-gnu
> (Ubuntu Linux, C and C++). No new regressions.
>
> I do not have GCC repository write access.
>
> Signed-off-by: Shiva <[email protected]>
> ---
>  gcc/gimple-range-op.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/gimple-range-op.cc b/gcc/gimple-range-op.cc
> index 20666ff0356..49196f752b2 100644
> --- a/gcc/gimple-range-op.cc
> +++ b/gcc/gimple-range-op.cc
> @@ -946,7 +946,7 @@ public:
>  class cfn_popcount : public cfn_ffs
>  {
>  public:
> -  using range_operator::fold_range;
> +  using cfn_ffs::fold_range;
>    virtual bool fold_range (irange &r, tree type, const irange &lh,
>                            const irange &rh, relation_trio rel) const
>    {

Reply via email to