[Info-vax] VMS Cobol - GnuCOBOL
bill
bill.gunshannon at gmail.com
Wed Mar 1 12:53:19 EST 2023
On 2/28/2023 2:11 PM, Dan Cross wrote:
>
>
> Consider, for example, this segment of code:
>
> unsigned short
> mul(unsigned short a, unsigned short b)
> {
> return a * b;
> }
>
I have always considered this to be really stupid code.
For the vast majority of values for a and b this is going to
overflow. That means that regardless of what "undefined behavior"
actually means the result will be useless.
What were we just saying about programmers not writing buggy code?
bill
More information about the Info-vax
mailing list