On Tue, 8 Oct 2024 at 13:59, Michael Matz <m...@suse.de> wrote:
>
> Hello,
>
> On Tue, 8 Oct 2024, Jonathan Wakely wrote:
>
> > We originally had global static variables, which means a different
> > variable per TU. That causes ODR violations which were silently
> > ignored until we try to use them in modules, where they're diagnosed.
> > So we need to replace them.
>
> Aren't these variables implementation detail?  If so violating language
> rules like ODR should be okay.  (Imagine libgcc would be written in some
> language where such rules doesn't exist).
>
> So isn't the actual problem that needs solving rather that c++ modules
> trip over these here?

Yes, I was thinking the same thing. Maybe we need a new attribute that
tells the front end not to diagnose the ODR violations for these even
in C++ modules.

Reply via email to