This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/41540] -dM -E doesn't #define __FILE__
- From: "msebor at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Oct 2009 16:39:31 -0000
- Subject: [Bug preprocessor/41540] -dM -E doesn't #define __FILE__
- References: <bug-41540-1186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from msebor at gmail dot com 2009-10-02 16:39 -------
I don't have a strong objection to not including __FILE__ and the rest of
standard predefined macros (e.g., __LINE__, __DATE__ and __TIME__) in the
output if that's by design but I would expect the documentation to mention
that some macros are deliberately left out. As it stands, it states that
all macros are defined, which is clearly not the case.
I suggest clarifying the documentation by changing the paragraph quoted
above to read:
"Instead of the normal output, generate a list of `#define' directives for
the majority of macros defined during the execution of the preprocessor,
including predefined macros (the standard macros __DATE__, __FILE__,
__LINE__, and __TIME__ are excluded from this list). This gives you a way
of finding out what is predefined in your version of the preprocessor."
I'm not familiar with the process for updating gcc docs but if you point me
in the right direction I would be happy to submit a patch.
--
msebor at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41540