Re: why use -> (not .) with pointers?



On 2005-06-30, Alan Balmer <albalmer@xxxxxxx> wrote:
> I think the OP was proposing that you could write structxp.fieldf even
> when structxp was a pointer to a struct. It's true that the compiler
> knows whether the dereference is required, but imo it doesn't fit with C
> philosophy (and don't ask me to define that ;-)

It's kind of interesting that the GNU debugger (gdb) has accepted the '.'
syntax for pointers to structs for as long as I can remember.

-Clint
.