Re: [PATCH] C undefined behavior fix

From: Momchil Velikov (velco@fadata.bg)
Date: Sun Jan 06 2002 - 06:09:32 EST


>>>>> "Paul" == Paul Mackerras <paulus@samba.org> writes:

Paul> I find it hardly helpful to be told that doing that is invalid without
Paul> anyone offering me a valid way to achieve the effect I want - and
Paul> no-one has, other than to say that as long as I dereference the

Number of people suggested using assembly for this, why you keep
ignoring it and insist instead on changing the compiler, changing the
C standard, switching to another compiler and similar unproductive
ideas put forward solely for the sake of argument ?

Paul> pointer some time later, in a different procedure, it should be fine.
Paul> Which is fine from a pragmatic point of view but it doesn't alter the
Paul> validity or invalidity of the operation.

>From a _pragmatic_ point of view you can just keep the code as is,
fixing the _extremely_ rare cases where violations of the standard
interfere with compiler optimizations. It is too much to ask to
penalize _all_ the software by preventing the compiler from doing
optimizations for the convenience of the maintainers of the PPC port
of Linux. As for listening to the users of the compiler (you mentioned
this in another mail), GCC maintainers (an C comitee, for that matter)
do exactly this. You just have to realize that _we_ are minority,
important, by nevertheless minority.

Regards,
-velco

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



This archive was generated by hypermail 2b29 : Mon Jan 07 2002 - 21:00:30 EST