Re: Patch to remove undefined C code

From: Helge Hafting (helgehaf@idb.hist.no)
Date: Tue Oct 17 2000 - 03:26:53 EST


Bernd Schmidt wrote:
>
> I've been playing with some gcc patches to detect code with undefined
> behaviour of the i = i++ variety. The patch below fixes all places in
> the kernel that I could find. Note that in some cases, it wasn't
> entirely clear what the code intended, so I had to guess.

Please don't guess. Look at the generated assembly, then make the
unambigous code do whatever the old code did. Chances are high it
worked ok by luck, as misbehaving code tend to get noticed as
it fails.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:10 EST