This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc Pre-Processing Information
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: ankit7777 <baid4758 at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 6 May 2011 16:16:22 +0100
- Subject: Re: gcc Pre-Processing Information
- References: <31557981.post@talk.nabble.com>
On 6 May 2011 12:21, ankit7777 <baid4758@gmail.com> wrote:
>
> Problem Statement : Given a C file which has several macros defined (eg.
> #define MACRO 10) . I need to know what all macros are defined and their
> usage point(eg. line number) in the code.
>
> Need to know this information during or after gcc pre-processing phase.
>
> Possible solution may dump this macro information in some file.
>
> Is there any way that gcc can dump this information and if yes how?
gcc -E -dD source.c | grep MACRO