PDA

View Full Version : Macro buffer exceeded



Anders Ohrt
21-Nov-2019, 12:56 AM
Hi,

I just did a test compile of one of our applications (knowing it would not work yet), and got a "macro buffer exceeded" error. We've hit this before in 19.0 when we have procedures with very many parameters and had to rearrange some code to get around this, but it seems the available buffer space has shrunken a bit more in 20.0.

Is this something that can be fixed in 20.0? I know it's an odd situation to have so many parameters that you hit this, but it is perfectly valid code and the rearranging needed does make the code worse.

Harm Wibier
21-Nov-2019, 04:40 AM
When you say 'very many parameters', how many?

The compiler has a buffer where it keeps track of information about the levels of macro expansions. This error indicates that it ran out of space in that buffer. The buffer did not get smaller, but when compiling for 64-bit it does write more data to it. The procedure command uses a recursive macro to parse the parameters why it is likely that you run into this with lots of parameters. It could be that changes in FMAC for 20 have a negative effect on this as well.

Long story short, we'll look into expanding this limit..

Anders Ohrt
21-Nov-2019, 04:46 AM
Harm,


When you say 'very many parameters', how many?

In this case, 28 of them.



Long story short, we'll look into expanding this limit..

Thanks!

Focus
21-Nov-2019, 05:06 AM
There is presumably a reason you are not passing them in a struct ?

Anders Ohrt
21-Nov-2019, 05:14 AM
For this function, I don't think structs were even part of the language when it was created. Even if they were, that would just have been an ugly kludge.

For the other function, the whole point of the function was to fill in a struct. Basically a Get CreateMyStruct sValue1 sValue2 ... to tMyStruct, instead of having 28 lines of Move sValue1 to tMyStruct.sValue1...

Stephen W. Meeley
20-Dec-2019, 10:15 AM
Anders,

We've just published Technology Preview 2 (20.0.2) and we've updated the size of the macro buffer. See the updated "Working with the DataFlex 2020 Technology Preview (https://www.dataaccess.eu/Working-with-the-DataFlex-2020-Technology-Preview.pdf-f736)" document for more information.