* * *

Author Topic: [Fixed] FPC 3.0.4 Compilation exception (fatal 1018)  (Read 5667 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 6756
Re: FPC 3.0.4 Compilation exception (fatal 1018)
« Reply #30 on: April 10, 2018, 12:13:39 pm »
No need. I fixed your code mess.......

See attachment in my previous post..... <grumpy ... >:D > I am not here to clean up code for professional programmers.
http://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=40839.0;attach=26134
Now...Well within an hour.... 8-) O:-) O:-) And still delphi compatible....
« Last Edit: April 10, 2018, 12:21:08 pm by Thaddy »
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

Thaddy

  • Hero Member
  • *****
  • Posts: 6756
Re: FPC 3.0.4 Compilation exception (fatal 1018)
« Reply #31 on: April 10, 2018, 12:28:10 pm »
A nice reward for our bet would be to close the bug report.  O:-) :D ;D ;D
Because the fatal error was correct and your code was a mess....

And that code that your provided never compiled on XE too...(it does not know that syntax)  Messing up modes, as I wrote before....
If it is a huge project, contact me.
« Last Edit: April 10, 2018, 12:40:31 pm by Thaddy »
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

ccrause

  • Full Member
  • ***
  • Posts: 127
Re: FPC 3.0.4 Compilation exception (fatal 1018)
« Reply #32 on: April 10, 2018, 01:33:38 pm »
Because the fatal error was correct and your code was a mess....
My expectation of the compiler is to report syntax and other code errors to the user, not puke all over itself when confronted with an invalid construct.  So regardless of whatever user code errors there may be in this case, the compilers should still not raise an exception - thus in my opinion there is a compiler bug.

Thaddy

  • Hero Member
  • *****
  • Posts: 6756
Re: FPC 3.0.4 Compilation exception (fatal 1018)
« Reply #33 on: April 10, 2018, 01:56:39 pm »
That's exactly what it - the compiler - did.... Try all the code yourself and you see why. He made a mess. It is not a compiler CRASH it is a fatal error because of the FOOD and it terminates gracefully with a nice error message.... Now... How Trump-like are you????
(I know you are not, but just in case: again this is about bad code and the compiler will not eat it. Check for yourself. You have my permission to fire him...)
ATM there is no dwim compiler.... It just says: ok if you f*(British u on the keyboard)ck up I'll have a tea break... and rightly so, because this was a REAL mess. And was fixed in 30 minutes.

Pointer mistakes by professionals. That was the post-mortem... I Lazarussed his code.... O:-)
« Last Edit: April 10, 2018, 02:08:25 pm by Thaddy »
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

jakubklos

  • New member
  • *
  • Posts: 11
Re: FPC 3.0.4 Compilation exception (fatal 1018)
« Reply #34 on: April 10, 2018, 02:15:45 pm »
Hats off to Thaddy!
After fixing the generic pointers mess (you are right, it was a mess but I didn't write the code :)) it really works.
I wonder how you managed to pin point the origin of the issue.
Thank you again.

PascalDragon

  • Full Member
  • ***
  • Posts: 190
  • Compiler Developer
Re: FPC 3.0.4 Compilation exception (fatal 1018)
« Reply #35 on: April 13, 2018, 02:58:42 pm »
That's exactly what it - the compiler - did.... Try all the code yourself and you see why. He made a mess. It is not a compiler CRASH it is a fatal error because of the FOOD and it terminates gracefully with a nice error message.... Now... How Trump-like are you????

It is indeed a compiler crash, because every exception occurring in the compiler is a crash by definition. If it's merely a programmer's mistake then the compiler should complain to the user and continue parsing as far as feasible and not raise an exception. I can even reproduce the error with a simple example.

Thaddy

  • Hero Member
  • *****
  • Posts: 6756
Re: [Fixed] FPC 3.0.4 Compilation exception (fatal 1018)
« Reply #36 on: April 13, 2018, 04:32:49 pm »
Strange. In that case I misunderstood that part. Anyway: his code is fixed.
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus