From b7e0b693a65793a5aeee51cf9fa58638376c6f06 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Wed, 13 Jul 2016 15:37:36 +0200 Subject: tccpp: Implement __BASE_FILE__ macro Like __FILE__ but always refers to the command line file name also from inside headers. --- tests/tcctest.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/tcctest.h (limited to 'tests/tcctest.h') diff --git a/tests/tcctest.h b/tests/tcctest.h new file mode 100644 index 0000000..b301c7c --- /dev/null +++ b/tests/tcctest.h @@ -0,0 +1,9 @@ +static inline const char *get_basefile_from_header(void) +{ + return __BASE_FILE__; +} + +static inline const char *get_file_from_header(void) +{ + return __FILE__; +} -- cgit v1.3.1