On 5 April 2016 at 11:17, leon zadorin wrote: > Incidentally, would you have some thoughts on why this is the case? I > know nothing of the theoretical challenges in representing ASTs in > precompiled headers so I'm just wondering whether this behaviour is > due to just a shortage of interest/need/time in GCC development land, > or whether there are some fundamental technical constrains which would > impede getting this done. I believe the PCH is just a read-only dump of the contents of memory after the input header is processed. I have no idea how feasible it would be to start poking at and extending those contents when read back in. > From reading clang (just for comparison, etc.) > http://clang.llvm.org/docs/PCHInternals.html#design-philosophy > just before a section on > http://clang.llvm.org/docs/PCHInternals.html#ast-file-contents > ... where they say: "Precompiled headers can be chained. When you > create a PCH while including an existing PCH, Clang can create the new > PCH by referencing the original file and only writing the new data to > the new file. " > ... it would feel like something of interest to the original question, > at least in terms of physical possibility of being able to achieve the > thing... but I'm probably way off base there also ;) I have no idea, but Clang's architecture is quite different to GCC's. Not all ASTs are equal.