Casting pointers

Peter Klausler pmk at craycos.com
Fri Jul 20 01:50:23 AEST 1990


volpe at underdog.crd.ge.com (Christopher R Volpe) writes:
> In article <1614 at ghost.stsci.edu>, davids at stsci.EDU (David Silberberg) writes:
> |>If the last line above were replaced by
> |>
> |>	 ptr = (char *)ptr + num_chars;
> |>
> |>it would perform as desired.  Does casting work on an lvalue?
> 
> I'm not sure if casting on an l-value is specified anywhere.

Casts NEVER produce lvalues.

Never ever ever ever ever.

Read section 3.3.4 of the standard.



More information about the Comp.lang.c mailing list