This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C] !PUBLIC COMMON var in c-decl.c
>
> The question you should ask is why it is COMDAT. It certainly shouldn't
> be public; the names for compound literals are an internal implementation
> default and it's OK for different translation units to have different
> compound literals assigned the same internal name. *If it has
> const-qualified type* then the storage used may be shared with other
> compound literals with the same contents (whatever the internal names).
OK, so we have COMDAT inside current unit where we expect all COMDAT symbols
with same value unified. I can relax my testing to allow this, but is rest of
machinery working as expected on COMDAT !PUBLIC stuff?
It seems like something we ought to unify within frontend...
Honza
>
> --
> Joseph S. Myers
> joseph@codesourcery.com