This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C undefined behavior fix
- From: jtv <jtv at xs4all dot nl>
- To: Gérard Roudier <groudier at free dot fr>
- Cc: "J.A. Magallon" <jamagallon at able dot es>, Tim Hollebeek <tim at hollebeek dot com>, Bernard Dautrevaux <Dautrevaux at microprocess dot com>, "'dewar at gnat dot com'" <dewar at gnat dot com>, paulus at samba dot org, gcc at gcc dot gnu dot org, linux-kernel at vger dot kernel dot org, trini at kernel dot crashing dot org, velco at fadata dot bg
- Date: Wed, 9 Jan 2002 21:44:45 +0100
- Subject: Re: [PATCH] C undefined behavior fix
- References: <20020108012734.E23665@werewolf.able.es> <20020109204043.T1027-100000@gerard>
On Wed, Jan 09, 2002 at 08:47:15PM +0100, Gérard Roudier wrote:
> On Tue, 8 Jan 2002, J.A. Magallon wrote:
>
> There is nothing in this code that requires the compiler to allocate
> memory for 'b'. You just invent the volatile constant concept. :)
What's so strange about volatile constant? In C, const means you're
not allowed to modify something--not that it won't change. A read-only
hardware register, for instance, would be const and volatile.
Jeroen