To avoid some linking errors

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 30 14:07:24 PDT 2012


On 10/30/12 5:07 PM, Brad Roberts wrote:
> 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.

Not getting this at all. All I'm saying is that if the compiler says "I 
can't find that foo() you're asking for", the most interesting piece of 
information for me is "where did I ask for it?"

> 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.

That's in the symbol.


Andrei


More information about the Digitalmars-d mailing list