https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176
--- Comment #8 from f.hollerer at gmx dot net --- I have to correct me. The __FILE_NAME__ macro goes in the direction I would like to have. But this does not solve the problem with assert(). My preferred solution is to have the expansion of the __FILE__ macro controlled by a command line options. As explained in my original post I use third party code which is augmented with asserts(). I don't want to touch this code. To my understanding assert() uses __FILE__ and __LINE__. I would like to have a command line option which let __FILE__ expand to the last path component (the filename) instead of an invocation dependent full path of that file. This would: - shorten the output of assert() - minimize the image size due to shorter strings - make the build reproduceable as the output does not depend on the current working directory. To sum up. This is what the feature request is about: https://www.iar.com/support/tech-notes/general/avoiding-full-paths-in-the-output-file/ Please provide a '--no_path_in_file_macros' as provided by the IAC compiler.