[fpc-devel] Error about unknown record field identifier
    Mehmet Erol Sanliturk 
    sanliturk at ttmail.com
       
    Thu Dec 10 12:01:25 CET 2009
    
    
  
Dear Free Pascal Developers ,
During filling a bug report , the report page has been disappeared
( due to one of my key presses I do not know which key it was ) on 
closing of Firefox .
And a new bug report page could not be obtained for reporting because an 
empty page is displayed . If any defective page remained in bug tracker 
from me , I only apologize for inconvenience to you .
I am repeating the problem below :
Assume there is a record declared within a source included into 
interface part of a unit which
it contains ONLY type declarations in its interface part ( where 
implementation part is empty ) .
Type R = record
          v1 : ...
          v2 : ...
          ...
          end ;
The program having around 750 units ( distributed over different 
directories )
  use that type unit and compiles successfully with
the following compilers ( all of them in Windows XP Professional ) :
FPC 2.3.1 from May 2008 Trunk ,
FPC 2.3.1 from Lazarus 0.9.29 SVN 22930
FPC 2.4.0rc1 .
If any change is applied in any part of a unit executable source ( all 
of the sources are in
different files included into units ) , compilation with Make option in 
FPC.CFG re-compiles
the program successfully .
BUT :
Assume that into the following type , one or more new variables are added :
Type R = record
          v1 : ...
          v2 : ...
          X : Integer ;
          Y : String [ 120 ] ;
          ...
          end ;
When the same program is compiled with Make option in FPC.CFG , the 
above compilers produce the following error messages :
Error : Unknown record field identifier ¨X¨
Error : Unknown record field identifier ¨Y¨
This means that change in the type record is not recognized by the 
compilers .
Types of the added variables are not important ( do not affect the 
production of error messages ) .
The only work around is to build programs after each such record content 
changes .
For every such record type modifications I am getting the above errors .
I did not report that issue previously because new releases issued after
FPC 2.3.1 May 2008 Trunk compiler .
As of today ( 2009-December-10 ) I have encountered the same error with
the above compilers . This shows that the error is persisting .
I did not apply any test whether that error is produced when a type is 
included directly into a unit source because I never write such a type 
into a unit source directly .
Thank you very much .
Mehmet Erol Sanliturk
    
    
More information about the fpc-devel
mailing list