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: dewar at gnat dot com, paulus at samba dot org
- Cc: 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: Sat, 5 Jan 2002 23:26:17 -0500 (EST)
- Subject: Re: [PATCH] C undefined behavior fix
<<There are some C compilers that are useful for implementing a kernel,
that's true. But when the maintainers of such a compiler say things
that imply that they feel they are constrained only by the standard
and not by the needs of their users, it is very discouraging.
>>
What is important is for these users to *clearly* and at least
semi-formally, state their needs. Saying general things about the need
to be useful is hardly helpful!
You quote Florian:
> You cannot manipulate machine addresses in C because C is
> defined as a high-level language, without backdoors to such low-level
> concepts as machine addresses.
Unfortunately Florian is right. The ability in C to manipulate low-level
concepts such as machine addresses is NOT part of the language, but rather
comes from exploiting aspects that are deliberately left implementation
dependent. This is why it is so important to formally state the requirements
that are being depended on.
I don't think anyone seriously objects to trying to formulate solutions
to what is indeed a very important problem.
But it is hardly helpful for people to take the attitude "we wrote this
kernel, and it worked, and any change to the compiler that stops it from
working is unacceptable".