This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Revised DWARF2 macro info patch
- To: Jason Merrill <jason_merrill at redhat dot com>
- Subject: Re: [PATCH] Revised DWARF2 macro info patch
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Tue, 03 Jul 2001 13:12:01 -0400
- Cc: Daniel Berlin <dan at cgsoftware dot com>, gcc-patches at gcc dot gnu dot org
- References: <878zicv8hl.fsf@cgsoftware.com><m366dbpi97.fsf@prospero.cambridge.redhat.com>
Jason Merrill <jason_merrill@redhat.com> writes:
> OK, though we might want to omit the start/end for files with no macro
> definitions.
If we did this, we'd get some of the info confused.
This is because we only know what line a file was included from, not
what *file* it was included from.
So we'd have the place of inclusion wrong if you had something like:
a.c
#include "test.h"
test.h
extern int a;
#include "hasamacro.h"
hasamacro.h
#define amacro(x) x+5
In this case, we'd omit test.h's start and end, and claim hasamacro.h
was included from line 2 of a.c.
What you really want is to omit start/end for files which have no
macro definitions, and don't include other files that *have* macro
definitions.
This is a bit tricker, since we are outputting on the fly.
>
> Jason
--
"I spilled spot remover on my dog. He's gone now.
"-Steven Wright