[fpc-devel] C-block reference syntax (blocker for 3.2)

Blaise at blaise.ru Blaise at blaise.ru
Mon Dec 9 17:52:00 CET 2019

On 09.12.2019 11:18, Jonas Maebe wrote:

> replying to almost every line of every mail how every different way of saying more or less the same thing is wrong.

I take issue with that description. Sven was not "saying more or less the same thing" in "different way". Instead, on every next step, without  formally admitting the previous mistake, Sven put forward a new claim that yet /another/ aspect does not work.
To prove that point, here is the list of VARARGS-related misconceptions (hopefully, also useful for future reference, in case the DCC implementation would again be used to justify FPC design decisions):
- without the built-in va_list, variadic parameters cannot be accessed without BASM:
	+ this can be done entirely in Pascal by taking the address of the preceding parameter; also, there is at least one another solution;
- custom va_list implementations are non-portable hacks (= should not be used):
	+ provided that such an implementation is fully ABI-conformant, it is not a hack;
- VARARGS are not allowed for non-external routine declarations:
	+ on selected platforms, it is allowed; also, it is allowed for nameless routines;
- custom va_list implementation does not work on the platforms where parameters are passed via registers:
	+ the mere presence of VARARGS is enough to instruct DCC to spill those registers, forming a contiguous array on the stack;
- there is no built-in va_list:
	+ on selected platforms, compiler intrinsics are available.

> Just show how a statement is wrong and be done with it (like with the code fragment you posted)

Not once had Sven ask me to prove any of my statements with a code snippet. And it does not appear that he disbelieved my specific assurances, more like he did not believe my general position "VARARGS works" and kept fruitlessly /guessing/ new circumstances where it does not.
(Obviously, the code shown only proves #5 and partially #3 on the above list.)

> There is no need to get personal.

I feel like Sven personally derailed this thread by focusing on two aspects not even crucial to the subject. And that feeling is aggravated by my understanding that, had I known that I was presenting the subject issue before the team for the first time, I would not even have mentioned those minor aspects. I would have started with simple "closures are orthogonal to calling conventions" and "this syntax collides with DCC syntax", and, probably, would not have wasted that much time on this thread.

> Sven is the one developer that has spent a lot of time on getting your code and patches ready for integration.

Yes. And I have expressed my gratitude on several occasions. However, I am not sure what this fact has to do with this thread. I am reacting solely to what has been written /here/, without prejudice or lenience.

> Sven is already working on it.

Speaking of nice conduct: it would have been nice to get informed right away; since, feeling partially responsible for this last-minute blocker, I have already started the work non-specific to the syntax amendment.
Anyhow, I believe that concludes my involvement on the subject issue. I thank everyone who immediately recognised a need for the syntax amendment.


More information about the fpc-devel mailing list