Issue Details (XML | Word | Printable)

Key: PCC-301
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Anders Magnusson
Reporter: Fred J. Tydeman
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Hex floating-point constants w/ large exponents done wrong

Created: 12/Apr/11 07:14 PM   Updated: 03/Jul/14 07:31 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: Intel Core i5 (64-bit mode); Linux Fedora Core 14 (64-bit); pcc 1.0.0 of 2011/02/21

 Description  « Hide
0x1p-9223372036854775808L gets converted to the value 1.L (should be 0.L).
The exponent is 2**63

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 01/May/14 01:33 PM
Use another way to find exponent size.

Fred J. Tydeman added a comment - 02/Jun/14 03:55 PM
Hex FP constants with very large exponents still done wrong in pcc 2014/04/20 on 64-bit systems.

Fred J. Tydeman added a comment - 02/Jun/14 08:48 PM
Here are some of the failure cases:
You can add a suffix of 'f', 'L', or nothing and all three types convert to the wrong value.

Anders Magnusson added a comment - 03/Jul/14 07:31 PM
Missed checking for + in hex constant exponent. Fixed now.