[Bug preprocessor/82176] New: Feature request: replace __FILE__ with file's basename instead its full name

2017-09-11 Thread f.hollerer at gmx dot net
: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: f.hollerer at gmx dot net Target Milestone: --- Actually, this is a feature request, not a bug report. It would be great to have a command line option to tell

[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name

2017-09-11 Thread f.hollerer at gmx dot net
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 ship

[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name

2019-10-29 Thread f.hollerer at gmx dot net
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

[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name

2019-10-29 Thread f.hollerer at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176 --- Comment #7 from f.hollerer at gmx dot net --- Yes, the __FILE_NAME__ macro provided by Clang is exactly the feature I am asking for: __FILE_NAME__ Clang-specific extension that functions similar to __FILE__ but only renders the last path

[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name

2019-10-29 Thread f.hollerer at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176 --- Comment #11 from f.hollerer at gmx dot net --- (In reply to jos...@codesourcery.com from comment #9) > On Tue, 29 Oct 2019, f.hollerer at gmx dot net wrote: > > > This would: > > > > - shorten the output of assert()

[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name

2019-10-29 Thread f.hollerer at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176 --- Comment #12 from f.hollerer at gmx dot net --- (In reply to Gregory Fuchedzhy from comment #10) > (In reply to f.hollerer from comment #8) > > To my understanding assert() uses __FILE__ and __LINE__. I would like to > > have