https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71463
--- Comment #16 from Milian Wolff <mail at milianw dot de> --- So how can I silence the warning then for the case I pasted in the first comment: ~~~~~~~~~~~~~~~+ #include <cstdlib> template<typename T> struct foo {}; foo<decltype(&::malloc)> emit_unexpected_warning; int main() { return 0; } ~~~~~~~~~~~~~~~+ Most notably when you take into account that this is only sometimes required based on the optimization level. Should I simply not use decltype and instead paste the definition of malloc inline? Or is there a "silent" decltype alternative I could use?