[4802] in Athena Bugs
Re: Saber msg: v2.1 (4/24/89 lycus vax Unix 4042 0)
daemon@ATHENA.MIT.EDU (Ken Raeburn)
Thu Apr 19 22:35:50 1990
Date: Thu, 19 Apr 90 22:35:36 -0400
From: Ken Raeburn <Raeburn@MIT.Edu>
To: marc@MIT.EDU
Cc: jtkohl@ATHENA.MIT.EDU, 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
>> 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), 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.
It does indeed make it a pointer to const struct; that _is_ what is
desired. It is, basically, a function that cannot modify the object
its argument points to; this may permit a compiler to perform extra
optimizations.
This is a known bug in Saber.