https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176
--- Comment #2 from f.hollerer at gmx dot net --- > See PR 42579 which has a patch to add __FILE_BASENAME__ for this purpose. Unfortunately this does not solve the problem when __FILE__ is used indirectly via the assert() macro shipped with the compiler toolchain.