Re: A case for `void *' for pointers to arbitrary (byte) buffers

Stan Shebs
2005-05-03T22:01:25Z

Mark Kettenis wrote:

>Why not use `xxx_byte *' instead of `void *'?
>---------------------------------------------
>
>* It's nonstandard. Why do we need a nonstandard type if a perfectly
> god standard type is available?
>
My inclination would be for gdb_byte *, as an abstraction of
"what people who understand the issue more than I do think is
the right type to use". 1/2 :-)

Personally I've never been comfortable with using void * because
it has its own set of semi-mysterious rules for use - yeah, if I
wear my compiler-guy hat, they work that way for a reason, but
when I wear my just-wanna-write-code hat, they are more of a
distraction.

Another downside of void * is it doesn't tell the reader whether
it means GDB's byte abstraction, or something else, such as a
declaration that has to be void * for consistency with system
headers or some such.

GDB seems like a big enough program to justify its own byte type.

Stan