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: Dautrevaux at microprocess dot com, paulus at samba dot org
- Cc: Franz dot Sirl-kernel at lauterbach dot com, benh at kernel dot crashing dot org,gcc at gcc dot gnu dot org, jtv at xs4all dot nl, linux-kernel at vger dot kernel dot org,linuxppc-dev at lists dot linuxppc dot org, minyard at acm dot org, rth at redhat dot com,trini at kernel dot crashing dot org, velco at fadata dot bg
- Date: Thu, 3 Jan 2002 08:28:37 -0500 (EST)
- Subject: RE: [PATCH] C undefined behavior fix
<<No, in fact the kernel isn't written in ANSI C. :)
If nothing else, the fact that it uses a lot of gcc-specific
extensions rules that out. And it assumes that you can freely cast
pointers to unsigned longs and back again. I'm sure others can add to
this list.
>>
Most certainly this list should exist in precise defined form. It is not
unreasonable to have a specific list of features that
a) significant programs rely on, and are allowed to rely on
b) gcc promises to implement as specified, regardless of the standard
What is not reasonable is to have various people informally guess at things
that "obviously" can be expected to work in any "reasonable" C implementation.
It is this kind of informality that is asking for trouble.