This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] C undefined behavior fix
- From: dewar at gnat dot com
- To: dewar at gnat dot com, guerby at acm dot org, mrs at windriver dot com
- Cc: gcc at gcc dot gnu dot org, linux-kernel at vger dot kernel dot org, paulus at samba dot org,trini at kernel dot crashing dot org, velco at fadata dot bg
- Date: Sun, 6 Jan 2002 14:32:01 -0500 (EST)
- Subject: Re: [PATCH] C undefined behavior fix
<<I think the goal and intent, for Ada and C as well, is to say that the
compiler will generate what is possible from assembly code written by
an expert on the platform, using the best fitting access that is
Ah ha! But then look again at my 16-bit example, an expert assembly
langauge programmer will use a 32 bit load if efficiency is not an
issue (and it does not matter if there are extra bits around), but
a 16-bit load if the hardware for some reason requires it. How is
the poort C compiler to distinguish these cases automatically?