Mike Stump wrote:

It is the difference between all features of gcc working, or just most of the features working. If you want pch to work, you have to think about the issue and do up the appropriate code. However, I bet you don't need pch to work. If you are doing real stuff for a real production compiler, well, I retract that.

If you want it to work, the rules are simple, all data must be allocated and managed by gc and have GTY(()) markers. You can escape the simplicity of this, if you want, but that requires way more thought and more code, slightly beyond the scope of this email.

So are you saying that the quick hack that i did will not work for fixing the memory problem I have but that it will probably raise its ugly head again or just that PCH will not work?

I am not interested in PCH for the moment, just in ensuring that the data i am using is not deleted.

This is not a permanent solution. I wish to get a prototype of my extension up and running soon and changing all my code to use the GCC garbage collector is a huge task and one which I am currently ill equipped to do.

Are there any advantages to using PCH besides it may make compiling the GCC compiler a little faster? In the case of many header files i can imagine it makes a large difference (For example tree.h is included almost everywhere and is quite a large file). The code in my header files is very small and these files are included in at most 5 c files so there is little speed advantage gained in precompiling these headers from what I understand. At most there is about 40 lines of code in each of them.

Thanks,
Brendon.

Reply via email to