Re: Use of SNaN
I am not on the stds-754 list, so have removed that, as my postings merely
bounce.
On Jan 10 2012, Vincent Lefevre wrote:
Your interpretation is wrong. See the example given by the Committee
(in the "Committee Discussion"):
http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_236.htm
Now, why does it not surprise me that WG14 is adopting an inconsistent
decision? The UK repeatedly objected to interpretations that contradicted
each other and sometimes even explicit, normative wording in the standard,
but got nowhere. Once, we got a formal (National Body) response that
effectively said that it was deliberately maintaining inconsistency,
because that was the way to get flexibility! I kid you not.
I am afraid, however, that you are mistaken, under ISO rules. In a DR,
the 'Discussion' section is informative, and the 'Response' is the only
normative section. There are a lot of reasons why the approach taken in
the Discussion is inconsistent with other parts of the standard, as I
and the BSI have raised in the past.
The GCC developers go in the same way:
Naturally. GCC is solid with code that takes the most permissive
attitude to the innumerable ambiguities in the C standard, which is
why so many C and C++ HPC programmers have trouble with the aggressively
optimising compilers typical on those systems. I would have hoped that
the 754 and 1788 standards take more note of such systems than most
developments - MPI certainly does.
Anyway these are not mailing-lists on the C standard. So, if you
reject the case of a union, just consider the case of characters;
the C standard is clear on that point.
Actually, no, it isn't. It's clear for unsigned char and nothing
else! As I and that DR said, it isn't the storing that is the problem
but the use as floating-point.
Anyway, I am not going to pursure this further. I gave up on WG14
about a decade ago, and a good half of the C-using communities did
the same. Whether almost all will do so now that C1X is out, only
time will tell.
Regards,
Nick Maclaren.