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]
Other format: [Raw text]

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....


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