https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108035
Bug ID: 108035 Summary: std::source_location::function_name() provides an empty string when used with clang++ Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: danhan at live dot ie Target Milestone: --- I ran this minimal example from cppreference https://en.cppreference.com/w/cpp/utility/source_location on godbolt https://godbolt.org/z/jYMYb8ez6 and source_location::function_name() returned an empty string where if the same code is compiled with gcc it returns what appears to be the value of __PRETTY_FUNCTION__ for the caller of the log(...) function, as both have __PRETTY_FUNCTION__ as an internal I would have expected the behavior to be the same. Consequentally I have posted this on the llvm bugtracker as well :) https://github.com/llvm/llvm-project/issues/59422