This is the mail archive of the gcc-patches@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]

Re: [PATCH] Revised DWARF2 macro info patch


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


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