This is the mail archive of the 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: [RFC] GCC caret diagnostics

On Mar 13, 2008, at 11:37 AM, Ian Lance Taylor wrote:
 As you know the optimizers can pull together information
from all over the place.  The actual warning can be issued for code
which looks very different from anything the user actually wrote.
Translating back to the problem in the user code can be complicated.
I don't think gcc is going to be able to do that translation.

While this is absolutely true, think about what you're saying here. Roughly categorized, there are two cases that happen:

1. The problem is relatively simple and doesn't require deep analysis to identify and explain to the user.
2. The problem is subtle, requiring multiple levels of optimizer to interact correctly to find the problem.

In case #1, you can have good location info and use cheap techniques for finding the problem. If you do this and tell the user, they are likely to understand and fix the problem.

In case #2, even if you find an obscure (and real!) bug, without *really* good location info, there is a very low likelihood that the user will understand it. It's more likely that they will turn off the warning or file a GCC bug.


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