This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Tweaking the pathname for __FILE__
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Paul Koning <paul_koning at dell dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 05 Nov 2010 19:53:29 +0100
- Subject: Re: Tweaking the pathname for __FILE__
- References: <F25A09CA-868E-49AF-B252-73FDC2581C84@dell.com>
Paul Koning <paul_koning@dell.com> writes:
> The full pathname in __FILE__ is sometimes more than is desirable. For example, if multiple people may be building software in different working directories, you end up with binaries that have lots of differences in them that obscure "real" changes. Or it may be that rebuilding "the bits we had back in SVN rev 12345" is made harder this way, which can hurt debugging.
__FILE__ expands to the file name you pass to gcc, so if you don't want
a full path don't pass a full path.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."