This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Precompiled headers and General Parsing of Header File
- To: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Subject: Re: Precompiled headers and General Parsing of Header File
- From: Mumit Khan <khan at xraylith dot wisc dot edu>
- Date: Fri, 31 Jul 1998 09:25:53 -0500 (CDT)
- Cc: "egcs at cygnus dot com" <egcs at cygnus dot com>
On Thu, 30 Jul 1998, Carlo Wood wrote:
>
> There is something else that makes me think however...
> It seemed to me that I could accomplish the same
> by using -fno-implicit-templates and instantiating
> templates only once, in a single source file.
> (I automated the generation of the instantiations,
> and it worked with gcc-2.7.x. It does NOT work with
> gcc-2.8.x and egcs, and I believe these to be broken).
> But, the speed up of this was VERY little. Almost nothing
> (maybe 10% faster).
Carlo,
I believe this is the second time you've mentioned that the combination of
-fno-implicit-templates with explicit instantiation is broken; could you
please elaborate what is broken with a few examples? I use it extensively
on all platforms except for ELF and PE-COFF, and so far I haven't had too
many problems.
I also don't understand what speedup you're referring to. For compile time
or runtime?
One change is that egcs-1.0.x expects return type on template function
instantiations whereas gcc-2.7.x simply ignored it (so you could simply
use void).
If you're using STL and had things working with 2.7.x, then there are of
course many changes due to the use of SGI STL. I have some old code that
had compile time switches to change between ObjectSpace STL and HP STL
and I had to rewrite the STL instantiations to make it work with egcs;
it was annnoying, but didn't take too long to convert a rather large body
of code making extensive use explicit instantiations.
Regards,
Mumit