This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: why are we not using const?
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: "Dave Korn" <dave dot korn at artimi dot com>
- Cc: "'Richard Guenther'" <richard dot guenther at gmail dot com>, "'Kaveh R. Ghazi'" <ghazi at caipclassic dot rutgers dot edu>, <gdr at integrable-solutions dot net>, <gcc at gnu dot org>, <lopezibanez at gmail dot com>
- Date: Thu, 29 Jun 2006 09:55:01 -0400
- Subject: Re: why are we not using const?
- References: <014d01c69b83$27ba9c40$a501a8c0@CAM.ARTIMI.COM>
On Jun 29, 2006, at 9:51 AM, Dave Korn wrote:
That's cheating! You casted away const, it's a blatant aliasing
violation,
you deserve everything you get.
No it is not, in fact it is legal C and there is no aliasing
violation as you
are still accessing the memory as an "int".
-- Pinski