This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

-frepo vs. Borland model



> From: Joe Buck <jbuck@synopsys.com>
> Date: Fri, 12 Sep 97 16:42:32 PDT
> Cc: egcs@cygnus.com
> 
> ....
> -frepo is in there, but I'm not really a fan of it.  The Borland-like
> approach to resolving template definitions, also present, does the same
> thing faster (expand templates in each module, use weak symbols to resolve).
> The price is more code bloat, but no extra link passes.  Folks might want
> to try -frepo to get a smaller executable after they have finished
> development; the repeated relinks -frepo gives you can be very slow,
> especially for STL users.

I also prefer the Borland method, provided the linker can support it.
That is to ignore multplied defined methods.
Is such linker is in egcs's scope?

> There have been vast improvements in templates.  The main missing feature
> (as far as I'm concerned), template member functions, has just been added
> to the egcs snapshots.

Indeed great improvement! Comparing the object sizes:

telaviv:951> cat avi.cc
#include <vector>
int vi(const vector<int>& a, int i)
{
   return a[i];
}
telaviv:952> g++ -c -O2 avi.cc; ls -l avi.o
-rw-r--r--   1 yotamm   products     3760 Sep 15 18:13 avi.o
telaviv:953> egcs++ -c -O2 avi.cc; ls -l avi.o
 .... annoying warning messages ...
-rw-r--r--   1 yotamm   products     1420 Sep 15 18:13 avi.o
telaviv:954> 

-- yotam


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]