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

            Bug ID: 124168
           Summary: [reflection] clean up compare_reflections
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

As discussed in
<https://gcc.gnu.org/pipermail/gcc-patches/2026-January/705756.html>:

compare_reflections has:

  /* TEMPLATE_DECLs are wrapped in an OVERLOAD.  When we have

       template_of (^^fun_tmpl<int>) == ^^fun_tmpl

     the RHS will be OVERLOAD<TEMPLATE_DECL> but the LHS will
     only be TEMPLATE_DECL.  They should compare equal, though.  */
  // ??? Can we do something better?
  lhs = maybe_get_first_fn (lhs);
  rhs = maybe_get_first_fn (rhs);

which we might try to remove if possible (or at least the ??? comment).  This
should wait till
<https://gcc.gnu.org/pipermail/gcc-patches/2026-February/708777.html> is
committed.

Reply via email to