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]
Other format: [Raw text]

Re: [PATCH] Fix PR debug/14114


Eric Botcazou <ebotcazou@libertysurf.fr> writes:

>> Then why is debug info generated for block scope function
>> declarations?  *That* sounds like it might be the real bug.
>
> The tree is referenced within a function, so it is processed by the 
> back-end when debug info is generated for the function.  Then 
> gen_subprogram_decl decides what to do with it.

Yes, and this doesn't happen when the original decl is at file scope.
i.e.

extern foo();

a() { extern foo(); }
foo(); { ... }

Why?

> So you think it is normal for the C front-end to consider that the 
> declaration of 'c' from 'b' shadows that from 'a'?

No, but I would rather you not try to bandage this deeply broken data
structure, especially when I'm within 200 lines of code of replacing
it.  Besides which, independent of whether c-decl is doing the right
thing (it isn't), it seems wrong that dwarf2out.c barfs in this
circumstance.

zw


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