Re: how to make gcc warn about arithmetic signed overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 21, 2013 at 09:55:07PM +0200, Jędrzej Dudkiewicz wrote:
> >> No, that's not true. You can't change the value of a const object in a
> >> valid program.
> >
> > I think I can but it may cause an undefined behavior:
> 
> Note, that Jonathan wrote "in a valid program". Your program is not
> valid, as it contains undefined behaviour - you change const int via
> pointer to non-const int.

Is p pointer in my code a pointer to non-const int? It points to bc
int memory address and bc is constant. Does C language bind constness
to an indentifier instead of memory address?

-- 
<wempwer@xxxxxxxxx>




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux