This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C compile time
- From: Wolfgang Bangerth <bangerth at ices dot utexas dot edu>
- To: Chris Lattner <sabre at nondot dot org>
- Cc: Jan Hubicka <jh at suse dot cz>, Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>, <gcc at gcc dot gnu dot org>
- Date: Wed, 18 Jun 2003 13:48:28 -0500
- Subject: Re: C compile time
- References: <Pine.LNX.4.44.0306181335260.14158-100000@nondot.org>
> Here is an idiom widely used in the LLVM code base, for example:
> http://llvm.cs.uiuc.edu/doxygen/GCSE_8cpp-source.html
Is this guaranteed to work? I mean, how can the address of a function with
static linkage be used in a virtual function table? (I think it should work,
since the vt can only be set up in this very file, but still...)
> Besides the fact that my project would benefit a lot from this, if there
> is no reason to not mark the methods static, we should.
If the class itself is declared in a an anonymous namespace, I agree.
Not that I'm opposed to your proposal, it's just that I don't see a whole lot
of code out there that uses this idiom. I wouldn't want to trade this feature
against another 10% slowdown in the compiler ;-)
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ices.utexas.edu
www: http://www.ices.utexas.edu/~bangerth/