This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: macros and defines used in file
- From: Brian Dessent <brian at dessent dot net>
- To: J?drzej Dudkiewicz <jedrzej dot dudkiewicz at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 29 Jun 2008 12:52:42 -0700
- Subject: Re: macros and defines used in file
- References: <ab4f06660806291237h452a4764l4174397928931d20@mail.gmail.com>
- Reply-to: gcc-help at gcc dot gnu dot org
J?drzej Dudkiewicz wrote:
> So, my question is - is there a way to force cpp or gcc (As I believe
> gcc has internal preprocessor, which can do a little more that
> standalone cpp?) to show defines and macros used during file
> preprocessing, even those, who aren't used because '#if' branching
> forbade it? Or is there any other, clever method to do what I want?
> (Clever as in "not by hand" :] ).
Can't you just diff the preprocessed source with and without
COMPONENT_NAME defined? If the output is identical then its presence
cannot possibly have any semantic effect.
Brian