https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110213
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I don't see an issue with this warning really as there is a temporary being created for the argument of type name and that is what the issue is warning about. the argument of type name is still passed via reference even and the temp is created on caller side as needed by the C++ standard even. There are other bugs dealing Wdangling-reference where they have false positive warnings dealing with different types of being warned about.