Register group proposal

Jim Kleck jim.kleck@NetergyNet.COM
Tue Feb 27 13:44:00 GMT 2001


Per Bothner wrote:
Jim Kleck <jim.kleck@NetergyNet.COM> writes:
> An alternative I have not seen discussed is to have "typedef void
* blah"
> as the public interface (then the implementation would need to cast
> the object to the internal representation before operating on it).
Then we lose the ability of the compiler to catch type errors.
--
        --Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Good point. I guess that leaves:
   struct blah;
   typedef struct blah *T_BLAH;
which preserves the type errors and simplifies the declaration of
objects of the desired type:
   T_BLAH this_blah;
vs.
   struct blah *this_blah;
JimK
 




More information about the Gdb mailing list