https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
--- Comment #1 from Ulrich Drepper <drepper.fsp+rhbz at gmail dot com> --- BTW, this also applies to the "unused variable" warning as in the code below but clang doesn't warn about that either. #include <memory> using type = std::shared_ptr<int>; type g; int f(int a) { auto p = g; return a+1; }