C compile time
Wolfgang Bangerth
bangerth@ices.utexas.edu
Wed Jun 18 19:30:00 GMT 2003
> 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/
More information about the Gcc
mailing list