[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: casts considered harmful
- From: Joseph S D Yao <jsdy tux org>
- To: morgan transmeta com (Andrew Morgan)
- Cc: pam-list redhat com
- Subject: Re: casts considered harmful
- Date: Tue, 2 Feb 1999 20:28:29 -0500 (EST)
> const void **
>
> I believe it is meant to be a pointer to a pointer to a 'const void'.
> That is the data at the far destination is supposed to be the thing that
> we cannot modify, not either of the pointers we use on the way.
True.
const X * * foo
X const * * foo
foo is a
pointer to a
pointer to a
constant X
The X's never change. The ptrs and p'ptrs may.
X * const * foo
foo is a
pointer to a
constant
pointer to an
X
The X's may change. The pointers to X's never do. But the pointers to
the pointers might.
X * * const foo
foo is a
constant
pointer to a
pointer to an
X
The X's may change. The pointer to X's may change. But foo never does,
and it points to the pointer to an X.
Not quite sure how this relates to the overall worth of casts, though.
--
/*********************************************************************\
**
** Joe Yao jsdy@tux.org - Joseph S. D. Yao
**
\*********************************************************************/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]