We still use very old GCC to compile OpenOffice.org to get the most possible compatibility available. This caused me many headaches in the recent development branch, because of very weird implementation of template instantiation depth counting in C++.
ANSI/ISO C++ standard defines that conforming programs must not rely on template instantiation depth greater than 17 (see info gcc). Newer GCC versions in fact can compile the code (see #i26518# for more details) without problems. But the old version seems to count the depth in a different way or it parses the code in a different manner.
All in all, I have to upgrade the build system on GNU/Linux to newer version. We are now running on very old SuSE Linux (8.0) thus I will probably upgrade to 8.2 or maybe even to 9.0. For now, I will use this patch.-----