This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/41540] -dM -E doesn't #define __FILE__



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]