Paul Schlie wrote:
They need not wrap around. People that are actually on the C standards
committee have told you this multiple times.
Yes, and may clearly produce erroneous results if the value ranges
are not consistent with the factual behavior of an implementation, i.e.:
Are you listening or not??? This is *not* meant to be inconsistent with
"the factual behavior of an implementation". It is simply not
specified. It is not portable. It should not be done. Period.
On many embedded machines, dereferencing a NULL pointer is perfectly
ok. To avoid problems with C optimizations where dereferencing a NULL
pointer is consider to have unspecified behavior, code is usually put
there. Does this make it "non-conformant" to optimize away this if?
char *a, b;
a = NULL;
b = *a;
if (a == NULL)
abort ();
Well, according to zillions of embedded C developers, it is not.
A similar case of unspecified behavior that "just works" is this. On
the i386, passing variadic arguments to a function without a prototype
usually just works. On other machines it may not because the ellipsis
has a different calling conventions. It is not specified. It is not
portable. It should not be done. Period.
Read the standard, *understand* what it says, then come back. Or anyway
do not complain here, propose a DR on the C standard committee and wait
for it to be rejected.
I *know* I'm being rude, but I'm also fed up by this utter waste of time
and bandwidth, and am not going to spend more time on this.
Paolo