Identifier (...) is too long by X characters

Sean Kelly sean at f4.ca
Mon Jul 10 08:41:07 PDT 2006


Don Clugston wrote:
> Sean Kelly wrote:
>> Chris Nicholson-Sauls wrote:
>>> Tom S wrote:
>>>> ...DMD eats many many rams...
>>>
>>> *Gasp!*  Those poor sheep/goats!
>>>
>>> I would be interested in seeing exactly what your 'Input' mixin 
>>> does.  The use of self-referancing returns to initialize it is pretty 
>>> nifty though.  Might be a way to get rid of the '.end' at the end, 
>>> though?
>>>
>>> The error baffles me, though.
>>
>> Symbols are limited to ~255 chars on Win32.  I think it's a limitation 
>> of the object file format.  "symbol too long" errors are painfully 
>> common in C++, though they're typically truncated to the max length to 
>> allow for debugging.
> 
> I thought the OMF lib-imposed limit was about 4K. I've just made a 
> template with a symbol name of 480 characters, and that was OK.

Perhaps it is--it's been a while since I developed on Windows.  I only 
remember seeing the errors quite often.

> Maybe in the future, we'll be able to add some kind of 'final' 
> declaration to templates, which would indicate that they don't need to 
> be stored in the object file or library, and can be discarded from the 
> symbol table as soon as they are instantiated. This would be 
> particularly useful for recursive templates, which can easily spew reams 
> of garbage into the object file.

This would be nice.  I generally expect this to occur anyway, but it 
would be nice to have some sort of insurance.


Sean



More information about the Digitalmars-d-bugs mailing list