问题
In a large and complex pile of source (not invented here, hacked together by Elbonian code-slaves) it can be the case that several bits of code have their own local duplicate of some common header file in their path.
Due to the many layers of build and use of guard macros to prevent re-definition, a value #defined in one place may therefore be remembered by the compiler and used elsewhere despite a more "local" header #defining the same thing.
My question is: Can I get the C preprocessor to spit out the name/path of the file where it originally "found" the definition of something?
来源:https://stackoverflow.com/questions/40652595/make-preprocessor-trace-the-source-of-a-definition