[4803] in Athena Bugs
Re: Saber msg: v2.1 (4/24/89 lycus vax Unix 4042 0)
daemon@ATHENA.MIT.EDU (John T Kohl)
Thu Apr 19 22:36:46 1990
Date: Thu, 19 Apr 90 22:36:31 -0400
From: John T Kohl <jtkohl@ATHENA.MIT.EDU>
To: marc@MIT.EDU
Cc: bugs@ATHENA.MIT.EDU
In-Reply-To: Marc Horowitz's message of Thu, 19 Apr 90 22:25:44 EDT,
> From: marc@ATHENA.MIT.EDU
> Reply-To: marc@MIT.EDU
> Date: Thu, 19 Apr 90 22:25:44 EDT
> >> int foo(msg)
> >> const struct bar *msg;
> >> {
> >> printf("message: %s\n",msg->data);
> >> }
> I may be wrong (parsing this stuff is worse for humans than
> computers)
use the inside out rule, or read from right to left.
>, but that doesn't declare msg as a const pointer. It makes
> it a pointer to a const struct, and you don't want that.
Yes, I do. The point is that I am declaring that the function will NOT
modify what msg points to, namely the const struct bar.
> How about:
> int foo(msg)
> struct bar * const msg;
This is a constant pointer, not a pointer to constant. Different
things; I want the latter.
Ken sez this bug has been in saber for ages; maybe it will be fixed in
saber v3.