I wonder where are predefined macros are defined and resided in?
Predefined macros are defined in compiler or preprocessor which has a dictionary that hold the pre-defined macros in the source code.
I mean __FILE__
macro has a definition and equivalence value in the compiler and the definition has been made in the compiler is it true?
The C Preprocessor, For GCC Version 9.2.0, Chapter 3.7 (Predefined Macros) says:
and later, for example
Meaning that there are no concrete definitions of these macros anywhere. During preprocessing time, the C preprocessor keeps track of which file it is currently processing and replaces
__FILE__
,__LINE__
and other "special" macros accordingly.