On Thu, 1 Jun 2017 20:10:55 -0400, Thomas David Rivers wrote:
>>
>Dereferencing NULL is undefined behavior - the C implemention
>can do whatever it wants... including ordering a cherry pie for
>your grandmother.
> 
Back around MVS 5.2, many library functions checked for NULL
and returned an explicit "pointer error" errno.  This is certainly
consistent with "whatever it wants".  But it seems many UNIX
hosts, deliberately or incidentally, have a 0 at virtual address 0,
and customers complained that programs which worked on those
other hosts failed, only for that reason, on MVS.  Shamefully, IBM
caved to their pressure; continued to check for NULL, and substituted
a pointer to a byte, halfword, word of 0x00.  I have generally
favored strict error checking and reporting over DWIM.  So I
was disappointed recently when DASM which had been reporting
a clear base-displacement resolution failure changed to match
HLASM which failed to report the error.

And I think it's loathsome that COBOL, by specification, ignores
(some?) overflows.  Is that what GAAP requires?

strcoll() is more locale-savvy.  What the world needs is strcasecoll().

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to