On Mon, Jun 08, 2015 at 07:18:24PM +0200, Anders Magnusson wrote: > David Holland skrev den 2015-06-08 19:06: > >On Mon, Jun 08, 2015 at 04:15:15PM +0200, Anders Magnusson wrote: > > >> printfing from the back of the front end is definitely "totally wrong > > >> in other ways that need to be rectified first" :( > > > Hm, I may be missing something, but what is wrong? > > > Where should you print it out otherwise? > > > >I would say the debug information ought to be attached to the > >representation nodes it describes as it moves through the backend; > >otherwise it's easily upset by fairly simple transformations. > > It's simpler than that :-) > > Debug info for all data declarations etc are printed out when found, > so are the declarations themselves. No reason to keep them.
...except perhaps for, say, removing unused static variables :-) > Debug info for code follows the code itself. This is necessary, since > the debug info must follow the reference to a place in the code stream, > otherwise the debug info might refer to a label that is optimized away > which is not acceptable by the assembler :-) Ok, never mind then; was responding to what was posted rather than what actually exists... -- David A. Holland dholl...@netbsd.org