New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistencies and Bugs in Native Types Behaviours #5099
Comments
From @zoffixznet*** Note: I started writing this, but when I got to uint8, I realized it was taking too much time, so I gave up; this is a partial report*** There are some inconsistencies with the behaviours among the native types, including buggy behaviour of postdecrement/increment ops when the increment/decrement would make underflow/overflow occur. Here's the summary table. Detailed code executes are in the attachment. The meaning of headers: WORKS: we flipped over the boundary and increment/decrement operation happened just once, returning the unmodified value in the second say(): BROKEN: operation happens TWICE and second say() behaves as if it were a prefix increment/decrement: And here's the table showing the results of my evaluation: [Type] [Assigning Too-Low Value] [Assigning Too-High Value] [Underflow works] [Overflow works] [Post-[de/in]crement on overflow works] byte |
From @zoffixznetint assigning too high/low value: int underflow works: int overflow works: int postop works: int8 assigning too high/low value: int8 underflow works: int8 overflow works: int8 postop does NOT work (behaves as if it were ++$x and --$x, AND operation happens twice): int16 underflow works: int16 assigning too high/low value: int16 overflow works: int16 postop does NOT work (behaves as if it were ++$x and --$x, AND operation happens twice): int32 assigning too high/low value: int32 underflow works: int32 overflow works: int32 postop does NOT work (behaves as if it were ++$x and --$x, AND operation happens twice): int64 assigning too high/low value: int64 underflow works: int64 overflow works: int64 postop works: uint assigning too high/low value: uint underflow behaves like int: uint overflow behaves like int: uint postop works (but behaves like int): uint8 assigning too high/low value: uint underflow works: uint assigning too high/low value: uint assigning too high/low value: uint assigning too high/low value: uint assigning too high/low value: uint assigning too high/low value: uint assigning too high/low value: |
Migrated from rt.perl.org#127409 (status was 'new')
Searchable as RT127409$
The text was updated successfully, but these errors were encountered: