Open HuguesDug opened 4 years ago
Thank you for reporting!
This is really strange. I've just given a go with Release settings and I can build with Delphi 10.3.
Hello, I tested again, no discussion : compiling fails. Delphi 10.3.3 Check your compilers directive inside project-settings-Delphi compiler - compiler options. Do you have the control inline code active ?
Here are my compiler directives, for release mode. They are default option, as I reinstalled recently the 10.3.3 over a clean install. It is a translation from French... sorry for the wording.
Other options : all unchecked
Debugging :
Runtime erros:
Code generation:
Syntaxe:
Keep in mind, I am running a project in a windows form.
As a fix, I did:
For TNNetLayer.ComputeErrorDeriv(), I copied past the code of the procedure to replace the call to the function (not nice, but does the job). However, surprised the code of this procedure differs between FPC and Delphi. You make some tests and act differently in FPC, where you do a basic call in Delphi. Very strange. For me, this is hiding something else than the compiler error message.
For the second error, function fNTL: TNeuralThreadList;, it is an error 2441. The variable "vNTL", it has to see with the visibility of the variable inside the interface of the class. You declare this variable inside the implementation section of the unit. You have to move it to the inferface section. This makes sens. You try to inline this variable inside an objet that is in the interface. The compiler gets frustrated about that.
Then, it compiles OK.
Thank you for sending details. I'll look into it.
I read delphi documentation regarding INLINE directive.
I confirm yourcode should not compile in 10.3, as the restrictions on the use of inline for specific cases clearly exclude what was programmed.
So, it is not a problem of compiler setting. More probably the fact that you did not test with "release mode" activated. So, INLINE was ignored.
Development environment. Delphi 10.3, targets windows 32 or 64 bits, release and debug. Last release of Master branch as of June 21rst.
Error : Compiler errors when trying to compile in Release mode.
Error 1: In NeuralNetwork.pas Compiler raise error : E2501 : inline not possible for a nested procedure.
This is due to inline directive" in the declaration of TNNetLayer.ComputeErrorDeriv(); It is activated when going in release mode, but not activated in debug.
Error2: In NeuralThread;pas Similar problem with function fNTL: TNeuralThreadList; {$IFDEF Release} inline; {$ENDIF} Cannot be inlined.