Incrementing after a cast

mat at mtx5a.UUCP mat at mtx5a.UUCP
Wed Jan 14 04:29:57 AEST 1987


> >Casts are conversions? Oh? You'd never know it looking at the code that
> >out of my C compilers ... including Harbison's!  He just regards away.
> 
> The sender's name and some of his text must have been processed by
> software written according to his notions of type casts!
> 
> >... Why lots of people with ordinary machines can't do something 
> >useful, intuitive, and natural because some solder-crazed EE somewhere might,
> >just might mind you, someday do something unnatural to his memory system is 
> >beyond me.  
> 
> Funny, I never considered Dennis Ritchie a "solder-crazed EE".
> He explained to this list not long ago that type casts definitely
> are conversions, done "as if" via assignment to unnamed temporary
> variables.  I don't know why this is so hard for some people to
> understand, unless perhaps there are instructors out there who
> are teaching falsehoods.

What gets generated on a given machine for a given input is of only marginal
relevance to the general case.  It is always sufficient for the compiler to
produce code which is equivalent to the ``correct'' code in every way that
matters in the given situation; if in that situation, the effect of a cast can
be produced with a null code sequence, it's fine for the compiler to do that
*in that circumstance*.
-- 

	from Mole End			Mark Terribile
		(scrape .. dig )	mtx5b!mat
					(Please mail to mtx5b!mat, NOT mtx5a!
						mat, or to mtx5a!mtx5b!mat)
					(mtx5b!mole-end!mat will also reach me)
    ,..      .,,       ,,,   ..,***_*.



More information about the Comp.lang.c mailing list