On Tue, 30 Oct 2012, Andrei Alexandrescu wrote:

> On 10/30/12 2:13 PM, Jesse Phillips wrote:
> > On Tuesday, 30 October 2012 at 07:43:41 UTC, Walter Bright wrote:
> > > On 10/29/2012 11:08 PM, Daniel Murphy wrote:
> > > > void foo();
> > > 
> > > There will be no line information for the above.
> > > 
> > > > void main()
> > > > {
> > > > foo();
> > > 
> > > For this, yes, but that is not what is being asked for.
> > 
> > Well, personally I think I would enjoy having this line number. The more
> > information the better.
> 
> Not sure I'm following but essentially if foo() is undefined the most
> interesting file/line references would be for all calls to foo(). The lines
> declaring foo() are nice to have but much less interesting.
> 
> Andrei

I don't think I agree.  The key questions that come to mind from an 
undefined symbol error at link time are:

1) Why did the compiler believe it would be?  If it didn't think it was a 
valid usable symbol, it would have already errored at the call site during 
semantic analysis.

2) what's the fully qualified name of the symbol?  Maybe the compiler is 
matching a different symbol than expected.  However, if that was the case, 
either it'd link against the unexpected match successfully, or see also 
#1.


Having the location of some or all of the call sites might help you find 
#1, but that's a poor substitute for pointing directly at #1.

Reply via email to