https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116852
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- I don't think there's a way besides wrapping those inside #pragma GCC visibility, using attributes and/or -fvisibility I also don't think being a template makes a function "special" to other functions, so not sure if a new -fvisibility-functin-templates-hidden makes sense.