Subject: | |
From: | |
Reply To: | |
Date: | Wed, 28 Oct 1998 16:19:57 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Walter Murray writes:
>[Bruce Toback wrote:]
>: The LHS, not the RHS of [a C] expression
>: can be a pointer to void. You can't assign a pointer to void to any other
>: kind of pointer without an explicit cast, but you can assign any pointer
>: type to a pointer to void. (Think about void * parameters, for example.)
>Well, actually, you CAN assign a pointer-to-void to another
>pointer without using a cast. For example, given (void *vp)
>and (int *ip), it is perfectly legal to assign (ip=vp).
Walter is correct -- any pointer type can be converted from void except a
function pointer. C++ has the tighter rule (ARM 4.6) that I mistakenly
thought applied to C as well.
Sorry about that.
-- Bruce
--------------------------------------------------------------------------
Bruce Toback Tel: (602) 996-8601| My candle burns at both ends;
OPT, Inc. (800) 858-4507| It will not last the night;
11801 N. Tatum Blvd. Ste. 142 | But ah, my foes, and oh, my friends -
Phoenix AZ 85028 | It gives a lovely light.
btoback AT optc.com | -- Edna St. Vincent Millay
Mail sent to [log in to unmask] will be inspected for a
fee of US$250. Mailing to said address constitutes agreement to
pay, including collection costs.
|
|
|