https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62051
--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> --- Created attachment 36480 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36480&action=edit visibility flag patch Is this the sort of thing you had in mind?