[Bug c++/88061] section attributes of variable templates are ignored
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 19 09:07:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88061
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2018-11-19
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'm not sure such request can be honored given the section has to be comdat
which essentially means it has to have it's own section for each
different instantiation. Thus, would we reject
template<unsigned x>
[[gnu::section(".my_data")]] const unsigned g_my_data {x};
template const unsigned g_my_data<0xf0f0f0f0>;
template const unsigned g_my_data<0xf0f0f0f1>;
as invalid with an error? Or somehow take .my_data as prefix and mangle
it appropriately, assigning it COMDAT?
Some things do not make very much sense for C++...
More information about the Gcc-bugs
mailing list