On Jan 1, 2008 12:39 AM, Frank Ch. Eigler <[EMAIL PROTECTED]> wrote: > > "Richard Guenther" <[EMAIL PROTECTED]> writes: > > > [...] I chose to ignore this problem and say we debug the optimized > > program, not the source as far as life ranges are concerned. [...] > > Yes, and this choice has a certain pragmatism. However, it seems to > miss the basic observation that what drives debugging are the > programmer-user's needs, not the compiler-writer's needs. A > programmer-user is primarily interested in his source, and I bet most > would prefer not to think about optimization artifacts at all. It > would be a disservice to amplify the visibility of the latter.
While I would generally agree with you, if you look at what debugging information could be retained at higher optimization levels you might want to reconsider. The less optimizations are applied to the program, the closer 'source level debug info' and 'optimized program debug info' are, so I believe this pragmatism is the right thing to do. But of course only real-life testing will tell. Richard.