Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-12

Error about unknown record field identifier

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mehmet Erol Sanliturk

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

Reply by email

Jonas Maebe
to Mehmet Erol Sanliturk
Mehmet Erol Sanliturk wrote
As of today ( 2009-December-10 ) I have encountered the same error with the above compilers . This shows that the error is persisting .

As usual, we need compilable source code that demonstrates this problem to fix it.

Jonas

Reply by email

Mehmet Erol Sanliturk
to Jonas Maebe
Jonas Maebe wrote 9 lines
On 10 Dec 2009, at 12:01, Mehmet Erol Sanliturk wrote: > As of today ( 2009-December-10 ) I have encountered the same error with > the above compilers . This shows that the error is persisting . As usual, we need compilable source code that demonstrates this problem to fix it. Jonas

Dear Jonas ,

An application test report is attached below .

Thank you very much .

Mehmet Erol Sanliturk

Reply by email

Jonas Maebe
to Mehmet Erol Sanliturk
Mehmet Erol Sanliturk wrote 7 lines
Jonas Maebe wrote: > On 10 Dec 2009, at 12:01, Mehmet Erol Sanliturk wrote: >> As of today ( 2009-December-10 ) I have encountered the same error with >> the above compilers . This shows that the error is persisting . > As usual, we need compilable source code that demonstrates this problem to fix it. An application test report is attached below .

It may be the same as http://bugs.freepascal.org/view.php?id=9961

There are some problems in the compiler with recompiling units that use include files in different directories than the unit itself.

Jonas

Reply by email

Mehmet Erol Sanliturk
to Jonas Maebe
Jonas Maebe wrote 15 lines
On 12 Dec 2009, at 12:33, Mehmet Erol Sanliturk wrote: > Jonas Maebe wrote: >> On 10 Dec 2009, at 12:01, Mehmet Erol Sanliturk wrote: >>> As of today ( 2009-December-10 ) I have encountered the same error with >>> the above compilers . This shows that the error is persisting . >> As usual, we need compilable source code that demonstrates this problem to fix it. > An application test report is attached below . It may be the same as http://bugs.freepascal.org/view.php?id=9961 There are some problems in the compiler with recompiling units that use include files in different directories than the unit itself. Jonas

It seems that the compiler is not appending path information to source file name when it is working on .ppu files . When I compile with all information from compiler , it is saying that
x.ppu is found , but ( after x.ppu is found )
only_source_name.pas is NOT found .

For me , it is not related to the first scanned unit , because in my large program it is occurring in units specified in any place in Uses statement .

In the first compilation when there is no any .ppu or .o files , or If all of the .ppu and .o files are deleted , such an error is never occurring .

Either there is no full path information in .ppu about included source file when it is in the interface part or it is ignored for .ppu files . These are guesses because up to now I could find which part of the compiler is compiling the unit interfaces . I could find starting place , but , not exactly flow of compilation lines . It seems that a property is performing the compilation but which one I do not know .

Thank you very much .

Mehmet Erol Sanliturk

Reply by email