This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C/C++: list of macro definitions?
Neil Booth wrote:-
> > Is there a way to dump out only the UTILIZED (ones that are expanded
> > somewhere) macros?
>
> No. -Wunused-macros does a bit of the reverse; it tells you which
> ones were unused that were also defined in the main file. 3.3 only.
>
> > And can it display where (file & line) the expansion occurs?
>
> No.
If you're wanting to catch all uses of an identifier that you don't
want to be used (I'm guessing what you really are trying to do here),
#pragma GCC poison ident_a ident_b ident_c
might do what you want.
Neil.