On Sat, Jan 09, 2021 at 08:37:48PM +0100, Samuel Thibault wrote: > Lisandro Damián Nicanor Pérez Meyer, le sam. 09 janv. 2021 15:53:41 -0300, a > ecrit: > > # __FILE__ is a public, well defined API > > ? My copy of C11 says > > “ > __FILE__ The presumed name of the current source file (a character string > literal) > ” > > that's not so well-defined. I would not expect it to necessarily > contain the path to it.
In fact, empirically I've seen that __FILE__ is expanded to whatever
path gets passed to the compiler.
You can easily see how stuff build with cmake get a full path in there,
whereas stuff built with make gets a path relative to the Makefile.
--
regards,
Mattia Rizzolo
GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`.
More about me: https://mapreri.org : :' :
Launchpad user: https://launchpad.net/~mapreri `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
signature.asc
Description: PGP signature

