[fpc-devel] Can't build FPC what can be a reason?

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Apr 20 10:39:23 CEST 2011


On 20 Apr 2011, at 09:24, Paul Ishenin wrote:

> 20.04.2011 14:37, Paul Ishenin wrote:
>> ENDTOKENS is declared in pbase.pas as
>> const
>> endtokens = [_SEMICOLON,_END,_ELSE,_UNTIL,_EXCEPT,_FINALLY];
>> 
>> Maybe this happen because ttoken contains > 256 elements and we do
>> pbyte(sym.value.valueptr+i)^ ?
> 
> My further research:
> 
> All tsetdef.size except endtokens have size = 4 or 32. endtokens has size = 33.

It's a bug in the compiler that it accepts that set constant declaration. Sets are only allowed to contain values up to ord(255). Anything more is not supported, although things may work at the code generation level depending on how the set is used and how many elements it has.


Jonas


More information about the fpc-devel mailing list