On Tue, Sep 14, 2010 at 11:50:11PM +0530, Uday P. Khedker wrote:
> The point is: in your program is is only a pointer. When you pass s
> as a parameter to printf, the compiler assumes that only s is being
> used so the (effective) assignment
> 
>    *s = 'H'
> 
> is deleted as dead code when optimization is enabled.

No, this is incorrect.  The issue must be specific to modification of
read-only data.

-- 
Daniel Jacobowitz
CodeSourcery

Reply via email to