On Sat, Aug 16, 2025 at 09:14:23AM -0400, Jason Merrill wrote:
> > I don't think this (or the following in this file) should be errors; we
> > error currently because we don't implement textual deduplication
> > (PR99000), but since the default arguments are the same, from the
> > current wording this should be OK as far as I understand it.
> > 
> > In particular, the default argument definition here is in a different TU
> > from that of the definition in M, so [basic.def.odr] p2 doesn't apply.
> > We test this the other way around in modules/default-arg-3.
> > 
> > (Note that the wording in the C++20 WD is not the same as the wording
> > diff given in p1766r1, it seems to have been adjusted before C++20 was
> > published: https://timsong-cpp.github.io/cppwp/n4861/basic.def.odr#1)
> > 
> > Let me know if I've misunderstood something here.
> 
> No, I think you're right.  So those should be dg-bogus xfail instead.

Do we expect to emit errors if the defargs are different?
If so perhaps dg-bogus xfail + another testcase with dg-error on different
defargs.

        Jakub

Reply via email to