Re: Code Review - is this code shit
- From: "Malcolm McLean" <regniztar@xxxxxxxxxxxxxx>
- Date: Sun, 2 Aug 2009 15:16:02 +0100
"spinoza1111" <spinoza1111@xxxxxxxxx> wrote in message
If you are writing portable code / routines then almost by definition it
Duh back at you. He tested on his computer and OS. It was completely
unprofessional not to test it on the customer's OS and using his
compiler.
isn't possible to test them on every platform for which they might be used.
However you are right. C has "implemention-defined behaviour" which means
that output might not be the same on all platforms. It also has "undefined
behaviour", which means that a bug might not manifest itself on the
development system. It would be better if we could specify the behaviour of
the program absolutely, as in Java.
However even Java had to relax this requirement due to different types of
floating point hardware. Insisting on it would have meant software emulation
of floating point, which was an inefficiency too far.
The real problem is in the hardware, not in C. Since microprocessors are
compartatively new, there are no firm standards for things like size of
bytes, endianess, address (pointer) representation, behaviour on
arithmetical overflow, the modulus operation with negative operands, the
size of an integer needed to index the whole of memory space, and so on.
.
- References:
- Re: Code Review - is this code shit
- From: pete
- Re: Code Review - is this code shit
- From: spinoza1111
- Re: Code Review - is this code shit
- From: jellybean stonerfish
- Re: Code Review - is this code shit
- From: spinoza1111
- Re: Code Review - is this code shit
- Prev by Date: Re: C99 float variants of math.h functions
- Next by Date: Re: Zero terminated strings
- Previous by thread: Re: Code Review - is this code shit
- Next by thread: Re: Code Review - is this code shit
- Index(es):
Relevant Pages
|