This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Converting GCC to compilation with C++
- From: "Dave Korn" <dk at artimi dot com>
- To: <gdr at acm dot org>,"'Robert Dewar'" <dewar at gnat dot com>
- Cc: "'Kai Henningsen'" <kaih at khms dot westfalen dot de>,<gcc at gcc dot gnu dot org>
- Date: Wed, 14 Jul 2004 18:14:26 +0100
- Subject: RE: Converting GCC to compilation with C++
> -----Original Message-----
> From: gcc-owner On Behalf Of Gabriel Dos Reis
> Sent: 14 July 2004 16:06
> One difference between the "hooks" and virtual functions
> is that the function pointer can get reset to something else
> (contrary to virtual functions which get set in the constructor
> by the compiler, one for ever) and we do not have a way to enforce
> the invariant that the hook should be set once.
Well, you could always declare the function pointer const and statically
initialise it.
And on the other hand, there might be legitimate occasions for changing
where a hook points to at runtime.
cheers,
DaveK
--
Can't think of a witty .sigline today....