This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C undefined behavior fix
- From: dewar at gnat dot com
- To: rth at redhat dot com, torvalds at transmeta dot com
- Cc: gcc at gcc dot gnu dot org, trini at kernel dot crashing dot org
- Date: Fri, 4 Jan 2002 19:24:11 -0500 (EST)
- Subject: Re: [PATCH] C undefined behavior fix
<<> Why not? It documents that You Can't Do That.
But that's against the C standard.
You _can_ cast a integer to a pointer and expect some defined meaning for
it.
>>
Once again, this unsupported statement that simply makes no sense.
Of course the meaning is defined in GCC, it is defined by the gcc coding,
this will tell you EXACTLY what to expect.
The idea that the C standard is requiring some simple semantics is wrong,
and the idea that the C standard is requiring the simple semantics that
YOU want is even wronger.
This is an old area of argument between those who make language standards
and those who code in the trenches. One of the measures of success of a
language standard is the extent to which it can narrow this gap. Clearly
the C standard has not done so well here so far :-)